Personal computing discussed

Moderators: SecretSquirrel, just brew it!

 
just brew it!
Gold subscriber
Administrator
Posts: 49738
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 8:55 am

@whm1974 - You will need to use the getchar() function from the C standard library, and a loop.
Nostalgia isn't what it used to be.
 
srg86
Gerbil Team Leader
Posts: 233
Joined: Tue Apr 25, 2006 7:57 am
Location: Madison, WI

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 9:01 am

just brew it! wrote:
I wouldn't say learning C is "unrewarding", but it's definitely more of a delayed gratification sort of thing, in that it'll probably take a lot longer before you'll be able to write programs that do something "interesting". I'd say the rewards (in terms of knowledge/skills) are arguably greater, but that doesn't help if it ends up being so difficult that you give up somewhere along the way.

Recall that I also originally recommended Python to start with.

Let's keep at the C for now since you seem to be highly motivated to learn it, but if it becomes too frustrating, perhaps shift over to Python instead, and come back to C later.


As much as I like C for its simplicity, I wouldn't exactly call C a great beginners language either. Personally I cut my teeth on Delphi Object Pascal and then backwards to Turbo Pascal 7. I always preferred (Borland's dialect of) Pascal to BASIC, which just looked messy.

I grew up after the era of home computers with built in BASIC, my first computer was an Amiga 1200 and AmigaBASIC had been removed from Workbench 2.x and later. The closest it had to a language was AREXX. So my first real programming experience was with compilers but I can see the appeal of using an interpreted language for teaching programming. You can get an instant gratification of write and run, rather than write, compile, run.

That said, since dabbling in Python, it seems a little overrated to me. Its not bad by any means, and the whole dictionary idea sounds cool. But I do find the whole "Code block through indentation" thing really hard to read. Plus classes not seeming to have proper data hiding seems odd. That said I've only dabbled. Is there something better than Python for teaching programming (and not BASIC ack!) or due to its ubiquity, is it still the best?
Intel Core i7 4790K, Z97, 16GB RAM, 128GB m4 SSD, 480GB M500 SSD, 500GB WD Vel, Intel HD4600, Corsair HX650, Fedora x64.
Thinkpad T460p, Intel Core i5 6440HQ, 8GB RAM, 512GB SSD, Intel HD 530 IGP, Fedora x64, Win 10 x64.
 
just brew it!
Gold subscriber
Administrator
Posts: 49738
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 9:08 am

Yes, Python has its idiosyncrasies; but in terms of getting stuff done quickly with a minimum of fuss, it's a solid tool. It is orders of magnitude better than BASIC as a first language, and if used properly results in elegant and easy to understand code.

It's also possible to write completely incomprehensible spaghetti code in it, but that's true of any language. Some just make you work harder at it than others. :wink:

All languages have their defenders/fanboys/evangelists. The real key is learning how to choose the right language for the job. You don't want to get caught in a "when all you have is a hammer, everything looks like a nail" sort of mindset. Sure, you can write a web server in bash shell, but for most use cases that would not be the ideal solution.
Nostalgia isn't what it used to be.
 
Vhalidictes
Gold subscriber
Gerbil Jedi
Posts: 1682
Joined: Fri Jan 07, 2005 2:32 pm
Location: Paragon City, RI

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 11:55 am

whm1974 wrote:
For some reason I'm going too fast to remember what I'm reading and finding myself having to go back and read the material over again. :evil: Is this normal and happens to everyone that is trying learn C or other programming languages?


Take notes on what you're reading.

This will 1) slow reading speed down a bit, and 2) help you internalize knowledge, especially if you haven't applied it yet.

I never need to refer back to my notes (although I try to keep them in good shape just in case), because the act of writing them helps me remember things.
 
Buub
Maximum Gerbil
Posts: 4645
Joined: Sat Nov 09, 2002 11:59 pm
Location: Seattle, WA
Contact:

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 1:04 pm

For what it's worth, I would not approach C++ as a superset of C, though it is capable of being used that way, or you will write very poor modern C++ code.

Consider C++ a separate language with different paradigms. Writing good C++ code is very different from writing good C code, and requires a different mindset.

In fact, from a learning perspective, I think going Java -> C++ is more productive than going C -> C++.
 
just brew it!
Gold subscriber
Administrator
Posts: 49738
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 1:14 pm

Buub wrote:
For what it's worth, I would not approach C++ as a superset of C, though it is capable of being used that way, or you will write very poor modern C++ code.

Consider C++ a separate language with different paradigms. Writing good C++ code is very different from writing good C code, and requires a different mindset.

Yeah, I thought I "knew" C++ until I started trying to use C++11. It is a superset, but the new stuff is a non-trivial change of direction.
Nostalgia isn't what it used to be.
 
whm1974
Gerbil Elder
Topic Author
Posts: 5466
Joined: Fri Dec 05, 2014 5:29 am

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 6:03 pm

Vhalidictes wrote:
whm1974 wrote:
For some reason I'm going too fast to remember what I'm reading and finding myself having to go back and read the material over again. :evil: Is this normal and happens to everyone that is trying learn C or other programming languages?


Take notes on what you're reading.

This will 1) slow reading speed down a bit, and 2) help you internalize knowledge, especially if you haven't applied it yet.

I never need to refer back to my notes (although I try to keep them in good shape just in case), because the act of writing them helps me remember things.

Unfortunately I've always been a poor note taker. Maybe I should simply add more documentation to any code I'm typing in so I can always go back review the code?
 
Redocbew
Gold subscriber
Graphmaster Gerbil
Posts: 1350
Joined: Sat Mar 15, 2014 11:44 am

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 6:08 pm

Even if you're not taking notes per say, I have to agree that writing stuff down is a pretty good way to burn something into memory. That's true even if that's the only reason for it, or even if it's just to help in visualizing what you're working on. My desk is often cluttered with scraps of paper where I've scribbled down pseudo-code fragments and then abandoned them while thinking through a problem.

If I'm referring to the source code its self to figure something out, then it's usually because there isn't anybody or any documentation I can go to about it, and I can't figure it out any other way.
Do not meddle in the affairs of archers, for they are subtle and you won't hear them coming.
 
just brew it!
Gold subscriber
Administrator
Posts: 49738
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 6:45 pm

whm1974 wrote:
Unfortunately I've always been a poor note taker. Maybe I should simply add more documentation to any code I'm typing in so I can always go back review the code?

Comments aren't just for other people who read your code, they're also supposed to help you remember what you did! So yes, definitely do that if you are having trouble remembering.
Nostalgia isn't what it used to be.
 
whm1974
Gerbil Elder
Topic Author
Posts: 5466
Joined: Fri Dec 05, 2014 5:29 am

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 7:05 pm

just brew it! wrote:
whm1974 wrote:
Unfortunately I've always been a poor note taker. Maybe I should simply add more documentation to any code I'm typing in so I can always go back review the code?

Comments aren't just for other people who read your code, they're also supposed to help you remember what you did! So yes, definitely do that if you are having trouble remembering.

Perhaps I should take a brief detour and look up how to do proper note taking?
 
just brew it!
Gold subscriber
Administrator
Posts: 49738
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 7:55 pm

whm1974 wrote:
just brew it! wrote:
whm1974 wrote:
Unfortunately I've always been a poor note taker. Maybe I should simply add more documentation to any code I'm typing in so I can always go back review the code?

Comments aren't just for other people who read your code, they're also supposed to help you remember what you did! So yes, definitely do that if you are having trouble remembering.

Perhaps I should take a brief detour and look up how to do proper note taking?

If you plan to take classes IRL.

For learning to code using eBooks and web sites, it is probably less useful. Annotating the code you write is probably more effective. When you need to remember how a particular language feature works, go back to the last program where you used it, and re-read the code & comments (or even use the previous program as a template for the new one if the problem you're solving is similar enough). In effect, you're building up your own library of code examples.

An aside --

I was terrible at note-taking when I was in high school and college. Even when I did take notes, they were often so illegible I couldn't read them afterwards. Fortunately, back then my memory was sharp enough that I managed to do OK in spite of a near-complete lack of decent notes.

Today my memory isn't what it used to be, so I take my laptop to meetings and type stuff I know I'll need to remember into a text document. All the projects I'm currently working on also have an associated text file where I track design and implementation ideas, testing/debugging progress, etc... kind of like a virtual lab notebook. Doing things this way has the added benefit of ensuring that all of my notes are legible!
Nostalgia isn't what it used to be.
 
whm1974
Gerbil Elder
Topic Author
Posts: 5466
Joined: Fri Dec 05, 2014 5:29 am

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 8:23 pm

just brew it! wrote:
whm1974 wrote:
just brew it! wrote:
Comments aren't just for other people who read your code, they're also supposed to help you remember what you did! So yes, definitely do that if you are having trouble remembering.

Perhaps I should take a brief detour and look up how to do proper note taking?

If you plan to take classes IRL.

For learning to code using eBooks and web sites, it is probably less useful. Annotating the code you write is probably more effective. When you need to remember how a particular language feature works, go back to the last program where you used it, and re-read the code & comments (or even use the previous program as a template for the new one if the problem you're solving is similar enough). In effect, you're building up your own library of code examples.

An aside --

I was terrible at note-taking when I was in high school and college. Even when I did take notes, they were often so illegible I couldn't read them afterwards. Fortunately, back then my memory was sharp enough that I managed to do OK in spite of a near-complete lack of decent notes.

Today my memory isn't what it used to be, so I take my laptop to meetings and type stuff I know I'll need to remember into a text document. All the projects I'm currently working on also have an associated text file where I track design and implementation ideas, testing/debugging progress, etc... kind of like a virtual lab notebook. Doing things this way has the added benefit of ensuring that all of my notes are legible!

I think I'll start doing what you doing plus at this point even over document any code I write so that other people reviewing it can tell me if I'm understanding the material correctly.
 
whm1974
Gerbil Elder
Topic Author
Posts: 5466
Joined: Fri Dec 05, 2014 5:29 am

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 9:21 pm

Speaking of note taking, I found these applications in the Manjaro Repositories.

BasKet Note pads
CherryTree - Hierarchical Note Taking
Gnote
Keepnote
KJots
Tomboy Notes
WizNote
Xournal
Zanshin
Renku (zanshin)
Zim Desktop Wiki

So many choices, which ones sound good?
 
DancinJack
Grand Gerbil Poohbah
Posts: 3186
Joined: Sat Nov 25, 2006 3:21 pm
Location: Kansas

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 9:34 pm

Just use Google Docs dude. Or Sublime Text if you prefer plain text.
i7 6700K - Z170 - 16GiB DDR4 - GTX 1080 - 512GB SSD - 256GB SSD - 500GB SSD - 3TB HDD- 27" IPS G-sync - Win10 Pro x64 - Ubuntu/Mint x64 :: 2015 13" rMBP Sierra :: Canon EOS 80D/Sony RX100
 
whm1974
Gerbil Elder
Topic Author
Posts: 5466
Joined: Fri Dec 05, 2014 5:29 am

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 11:02 pm

I picked CherryTree due to being hierarchical and cross platform. I'm reading the manual now.
 
DancinJack
Grand Gerbil Poohbah
Posts: 3186
Joined: Sat Nov 25, 2006 3:21 pm
Location: Kansas

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 11:18 pm

WHM, come on now. You're trying to find an application to take notes because you can't remember everything you're doing, and to document the work you do. I don't think picking an application that requires you to read the manual before you start taking notes is the right choice.
i7 6700K - Z170 - 16GiB DDR4 - GTX 1080 - 512GB SSD - 256GB SSD - 500GB SSD - 3TB HDD- 27" IPS G-sync - Win10 Pro x64 - Ubuntu/Mint x64 :: 2015 13" rMBP Sierra :: Canon EOS 80D/Sony RX100
 
whm1974
Gerbil Elder
Topic Author
Posts: 5466
Joined: Fri Dec 05, 2014 5:29 am

Re: GCC errors with compiling C code.

Mon Nov 13, 2017 11:31 pm

DancinJack wrote:
WHM, come on now. You're trying to find an application to take notes because you can't remember everything you're doing, and to document the work you do. I don't think picking an application that requires you to read the manual before you start taking notes is the right choice.

I tend to read the the documentation of the applications that I use anyway. And besides, if this is one the best apps out then it is well worth reading the manual now isn't it?
 
FlamingSpaceJunk
Gerbil
Posts: 11
Joined: Thu Nov 09, 2017 4:21 pm

Re: GCC errors with compiling C code.

Tue Nov 14, 2017 12:52 am

I'd like to add cprogramming.com and cppreference.com as good places to poke around and learn about C. Cprogramming.com has a good quick overview, and cppreference.com has code examples showing how different parts of C work.

srg86 wrote:
As much as I like C for its simplicity, I wouldn't exactly call C a great beginners language either.


It's not the worst. A compiler and a text editor are that's needed to get started. It's pretty freeform, and you don't have to know how to bootstrap an entire environment to get it working.

The closest it had to a language was AREXX. So my first real programming experience was with compilers but I can see the appeal of using an interpreted language for teaching programming. You can get an instant gratification of write and run, rather than write, compile, run.

It's not so much instant gratification as it's easy to to do really complicated stuff quickly since the minor details are automagically taken care of.

That said, since dabbling in Python, it seems a little overrated to me. Its not bad by any means, and the whole dictionary idea sounds cool. But I do find the whole "Code block through indentation" thing really hard to read. Plus classes not seeming to have proper data hiding seems odd. That said I've only dabbled. Is there something better than Python for teaching programming (and not BASIC ack!) or due to its ubiquity, is it still the best?


What are you trying to do with Python? It's not particularly good at interfacing with the system, but aside from that Python is pretty good.

A text editor which shows indent levels is handy for Python code. Of course, it's not any worse then most code that follows generally accepted standards.

Python kind of does have private data. "__varname = 'X'" would be private. It's the two underscores that make it private. However, Python is supposed to be a simple, uncomplicated RAD language, and private data is anathema to that.

There's not really anything better then Python. The standard library is clean and focused with lots of features, and the rules are easy to learn.
 
just brew it!
Gold subscriber
Administrator
Posts: 49738
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: GCC errors with compiling C code.

Tue Nov 14, 2017 6:44 am

@whm1974 - You're over-thinking this and not staying focused. I just create plain text files in Kate, KDE's text editor. Same editor I use for writing code. It's already there, it's already open when I'm coding, and I don't need to learn anything else. Being cross-platform doesn't even enter into it because the files are plain text, and will open in whatever text editor is available if I'm on a system without KDE.

It almost feels like you're looking for excuses to do something else. Do you really want to learn C programming or not?

FlamingSpaceJunk wrote:
What are you trying to do with Python? It's not particularly good at interfacing with the system, but aside from that Python is pretty good.

Depends what you mean by "interfacing with the system". If (as I assume) you mean making native system calls where there isn't already a Python wrapper or library, or effective use of native multi-threading, then yeah I agree, it kinda sucks at those things. OTOH, running shell commands as sub-processes is easy.
Nostalgia isn't what it used to be.
 
whm1974
Gerbil Elder
Topic Author
Posts: 5466
Joined: Fri Dec 05, 2014 5:29 am

Re: GCC errors with compiling C code.

Tue Nov 14, 2017 8:21 am

[quote="just brew it!"]@whm1974 - You're over-thinking this and not staying focused. I just create plain text files in Kate, KDE's text editor. Same editor I use for writing code. It's already there, it's already open when I'm coding, and I don't need to learn anything else. Being cross-platform doesn't even enter into it because the files are plain text, and will open in whatever text editor is available if I'm on a system without KDE.

It almost feels like you're looking for excuses to do something else. Do you really want to learn C programming or not?
Oh yes I really do want to learn C, but if I can learn how to do a bunch of other things along the way, well then that will be great as well.
 
srg86
Gerbil Team Leader
Posts: 233
Joined: Tue Apr 25, 2006 7:57 am
Location: Madison, WI

Re: GCC errors with compiling C code.

Tue Nov 14, 2017 9:29 am

FlamingSpaceJunk wrote:
What are you trying to do with Python? It's not particularly good at interfacing with the system, but aside from that Python is pretty good.


I was actually trying to manipulate ELF executables in something I could run as part of a buld process, so a good time to use a script, which I was able to do quite successfully.

Though a good text editor does help, and I think PyCharm is the best for Python work, it doesn't matter what type of code it is, I've never found the indenting method as easy to read as {} or Begin/End blocks, but that's just a personal preference. In C/C++ I also find:

if (something)
{
  something.
}


much easier to read than:

if (something) {
  something.
}
Intel Core i7 4790K, Z97, 16GB RAM, 128GB m4 SSD, 480GB M500 SSD, 500GB WD Vel, Intel HD4600, Corsair HX650, Fedora x64.
Thinkpad T460p, Intel Core i5 6440HQ, 8GB RAM, 512GB SSD, Intel HD 530 IGP, Fedora x64, Win 10 x64.
 
just brew it!
Gold subscriber
Administrator
Posts: 49738
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Tue Nov 14, 2017 10:49 am

srg86 wrote:
FlamingSpaceJunk wrote:
What are you trying to do with Python? It's not particularly good at interfacing with the system, but aside from that Python is pretty good.

I was actually trying to manipulate ELF executables in something I could run as part of a buld process, so a good time to use a script, which I was able to do quite successfully.

Though a good text editor does help, and I think PyCharm is the best for Python work, it doesn't matter what type of code it is, I've never found the indenting method as easy to read as {} or Begin/End blocks, but that's just a personal preference. In C/C++ I also find:

if (something)
{
  something.
}

much easier to read than:

if (something) {
  something.
}

I prefer the second form, but use the first one for function definitions, go figure. :lol:

As long as indentation is used sensibly, I don't find either form particularly more readable than the other per se. But the second form saves vertical space, making it more likely that a given function definition will fit within a reasonably sized editor window (which does improve readability).

My default coding style for if/else is:
if (something) {
  /* something */
} else {
  /* something else */
}

I guess this is also why I'm not too bent (it only bothers me a little...) about Python's explicit use of indentation to indicate control flow. You should be indenting things sensibly anyway!
Nostalgia isn't what it used to be.
 
srg86
Gerbil Team Leader
Posts: 233
Joined: Tue Apr 25, 2006 7:57 am
Location: Madison, WI

Re:

Tue Nov 14, 2017 11:27 am

just brew it! wrote:
srg86 wrote:
FlamingSpaceJunk wrote:
What are you trying to do with Python? It's not particularly good at interfacing with the system, but aside from that Python is pretty good.

I was actually trying to manipulate ELF executables in something I could run as part of a buld process, so a good time to use a script, which I was able to do quite successfully.

Though a good text editor does help, and I think PyCharm is the best for Python work, it doesn't matter what type of code it is, I've never found the indenting method as easy to read as {} or Begin/End blocks, but that's just a personal preference. In C/C++ I also find:

if (something)
{
  something.
}

much easier to read than:

if (something) {
  something.
}

I prefer the second form, but use the first one for function definitions, go figure. :lol:

As long as indentation is used sensibly, I don't find either form particularly more readable than the other per se. But the second form saves vertical space, making it more likely that a given function definition will fit within a reasonably sized editor window (which does improve readability).

My default coding style for if/else is:
if (something) {
  /* something */
} else {
  /* something else */
}

I guess this is also why I'm not too bent (it only bothers me a little...) about Python's explicit use of indentation to indicate control flow. You should be indenting things sensibly anyway!


I actually find the extra whitespace provided by having the { on its own line easier to read, I've even found myself "losing" and having to hunt for the beginning of a block because the { placement here is more subtle. Again all personal preference, and having { on the same line is used by the K&R book, which is why Linux (and projects using the Linux kernel coding standards) uses it.
Last edited by srg86 on Tue Nov 14, 2017 11:35 am, edited 2 times in total.
Intel Core i7 4790K, Z97, 16GB RAM, 128GB m4 SSD, 480GB M500 SSD, 500GB WD Vel, Intel HD4600, Corsair HX650, Fedora x64.
Thinkpad T460p, Intel Core i5 6440HQ, 8GB RAM, 512GB SSD, Intel HD 530 IGP, Fedora x64, Win 10 x64.
 
just brew it!
Gold subscriber
Administrator
Posts: 49738
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: GCC errors with compiling C code.

Tue Nov 14, 2017 11:31 am

At the end of the day, if you're writing code in a professional setting you're going to want to conform to whatever style the rest of the team uses. (Assuming they actually have official coding standards. And that people tend to follow them. :lol:)

There's nothing more annoying than having one maverick developer who does things "my way". Years ago I worked at a place where one of the C developers was a former COBOL programmer. Insisted on #defining all of the C operators to their COBOL equivalents, and using those instead in any modules he wrote. This eventually resulted in a meeting where he was told very bluntly to cut that sh*t out.
Nostalgia isn't what it used to be.
 
Captain Ned
Gold subscriber
Global Moderator
Posts: 26473
Joined: Wed Jan 16, 2002 7:00 pm
Location: Vermont, USA

Re: GCC errors with compiling C code.

Tue Nov 14, 2017 11:31 am

If the Earth were flat, cats would have pushed everything off of it by now.
 
srg86
Gerbil Team Leader
Posts: 233
Joined: Tue Apr 25, 2006 7:57 am
Location: Madison, WI

Re: GCC errors with compiling C code.

Tue Nov 14, 2017 11:36 am

just brew it! wrote:
At the end of the day, if you're writing code in a professional setting you're going to want to conform to whatever style the rest of the team uses. (Assuming they actually have official coding standards. And that people tend to follow them. :lol:)

There's nothing more annoying than having one maverick developer who does things "my way". Years ago I worked at a place where one of the C developers was a former COBOL programmer. Insisted on #defining all of the C operators to their COBOL equivalents, and using those instead in any modules he wrote. This eventually resulted in a meeting where he was told very bluntly to cut that sh*t out.


At work I work on UEFI and Coreboot code. Coreboot uses Linux kernel style, UEFI has errr its own style. So I have to adhere to multiple styles! :-)

For my own code.I have actually been mulling over in my mind whether to swtich to { on the same line, as so much code I see in the wild uses it. I think the reason I do it this way comes over from my old Pascal days

if something then
begin
  something;
  something
end;
Intel Core i7 4790K, Z97, 16GB RAM, 128GB m4 SSD, 480GB M500 SSD, 500GB WD Vel, Intel HD4600, Corsair HX650, Fedora x64.
Thinkpad T460p, Intel Core i5 6440HQ, 8GB RAM, 512GB SSD, Intel HD 530 IGP, Fedora x64, Win 10 x64.
 
just brew it!
Gold subscriber
Administrator
Posts: 49738
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: GCC errors with compiling C code.

Tue Nov 14, 2017 11:43 am

Yeah, my first structured language was Pascal too. IIRC I did use the "open brace on the next line" form when I first learned C too.
Nostalgia isn't what it used to be.
 
DancinJack
Grand Gerbil Poohbah
Posts: 3186
Joined: Sat Nov 25, 2006 3:21 pm
Location: Kansas

Re:

Tue Nov 14, 2017 12:04 pm

just brew it! wrote:
My default coding style for if/else is:
if (something) {
  /* something */
} else {
  /* something else */
}

I guess this is also why I'm not too bent (it only bothers me a little...) about Python's explicit use of indentation to indicate control flow. You should be indenting things sensibly anyway!


This is what I was taught so this is how I code. /shrug I admit it gets messy sometimes and can be hard to read for some. Just keep one convention, that's all I ask.
i7 6700K - Z170 - 16GiB DDR4 - GTX 1080 - 512GB SSD - 256GB SSD - 500GB SSD - 3TB HDD- 27" IPS G-sync - Win10 Pro x64 - Ubuntu/Mint x64 :: 2015 13" rMBP Sierra :: Canon EOS 80D/Sony RX100
 
Redocbew
Gold subscriber
Graphmaster Gerbil
Posts: 1350
Joined: Sat Mar 15, 2014 11:44 am

Re: GCC errors with compiling C code.

Tue Nov 14, 2017 12:06 pm

whm1974 wrote:
Oh yes I really do want to learn C, but if I can learn how to do a bunch of other things along the way, well then that will be great as well.


One project at a time dude. Otherwise you'll be one of those people who has 8 different projects going all at varying levels of being unfinished. There's nothing really wrong with that in its self, unless you want to get to a point where you feel like you've finished something.
Do not meddle in the affairs of archers, for they are subtle and you won't hear them coming.
 
just brew it!
Gold subscriber
Administrator
Posts: 49738
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: GCC errors with compiling C code.

Tue Nov 14, 2017 12:11 pm

Redocbew wrote:
whm1974 wrote:
Oh yes I really do want to learn C, but if I can learn how to do a bunch of other things along the way, well then that will be great as well.

One project at a time dude. Otherwise you'll be one of those people who has 8 different projects going all at varying levels of being unfinished. There's nothing really wrong with that in its self, unless you want to get to a point where you feel like you've finished something.

I have a lot of projects like that. Both tech and non-tech related. :lol:

But yeah, @whm1974, if you're serious about doing this, try not to go off on too many tangents. Seems like you've got some enthusiasm/momentum right now; if you put it aside, you may lose that.
Nostalgia isn't what it used to be.

Who is online

Users browsing this forum: No registered users and 1 guest