C or C++?

Uhm…choosing C over C++ just to learn clean syntax?
Well C++ is definitely a lot stricter about types (however you still can cast as you please, for shooting yourself in the foot). And gcc aswell as many other compilers have extensions that allow many non-ANSI-C places to declare variables anyway, so they don’t even bother informing you unless explicitly set them to strict ANSI mode. And then there’s C99 anyway…although widely ignored.
For me declaring everything at the beginning of a code block even tends to cause more unused variables over time…but on the other side, there are a lot of usefull extra-warnings in either language that help keeping code clean and identify stupid mistakes, definitely use them!

Anyway, learning some C never hurts IMHO. I didn’t learn a “simpler” language first, actually most languages do more stuff implicitly than C which often confuses me. I wouldn’t say Python is really easier from the pure language aspect. C is a bit like assembly on steroids. It’s simple, you have to do everything yourself, the compiler will only warn you at best. But you’ll rarely ask yourself “what kind of automagically stuff makes this statement working again?”, and there’s plenty (for some too much) of it in C++ :slight_smile:

Btw. neither C nor C++ have strict formatting rules, so readabilityreadability is more or less up to the coder. And be aware that C++ is not a strict superset of C, so if you switch, get a good guide about what is not allowed in C++ that is allowed in C.

Well if you decide to go with c++, I would recommand the following:

Code::Block (IDE program which has everything configured for you, for compiling/debugging/writing c++ code)
http://www.codeblocks.org/downloads.shtml

And the Following tutorial: http://www.cplusplus.com/doc/tutorial/

Lynx3d: Well I didn’t say to pick C purely for syntax. It was just one factor. I would, for example, advice not to start off with Python. C++ is okay too, but I would (personally) advice NOT to start out with any OOP-language. Less is more when learning new stuff. OOP can wait to a second language, imho. C is also nice because, as you put it, it is closer to assembly and thus provides some insight into the inner workings of the program. No need to involve garbage collectors, references, namespaces, inheritance and objects too early, especially when most beginners think pointers are complicated. That would be like learning to ride a bike before learning to walk. Sure, it is very much possible and I personally know many ppl who have done so. The problems often arise later when they try to work their way backwards and learn the languages inner workings. Many of those who I know that have begun learning high level languages first often tends to think that the computers are seeing the code in the same syntax as them. They often have bigger problems speeding up algorithms or working with lowlevel access to hardware etc.

well I guess I’ll start with C, by the way the site not only teachs C++ but C and it does have a message bored. But the thing is what compiler to download?
http://www.cprogramming.com/compilers.html

At the bottom of the page it suggests compilers to use which one should I use as A beginner?

I’m using windows xp home edition, on a laptop, 2.50 GHz, 240M of RAM

Digital mars is very good.

For windows use Bloodshed Dev-C++.

http://www.bloodshed.net/devcpp.html

Nice IDE that automaticly installes the mingw32 gcc compiler. Great for starting off. If you really get into it someday (like a year from now), the Microsoft Visual Studio is hard to beat. Their debug tools are seccond to none. If you have the money Microsoft Visual C++ is probably the best C/C++ compiler for windows, not to mention the fastest.

That all being said, when it comes to simplicity, I still have to say that Python is better. Let me explain:

My kid brother is 12. He started out in RapidQ and VB5. He’s okay with those, but looking for a common/portable language. I tried to start him out in C, but C is almost too low level. Things like pointers, have a way of going haywire with no indication of what is wrong. I showed him Python, and he is picking it up almost as fast as I did (I’m 22 and Python is approx. my sixth programming language). For learing the basics of progamming, you cannot beat python. Learn C after spending at least 3 months with Python, that’s my recomendation.

All that being said, there is allot to be said for general maturity. My brother is so young that his logical thinking skills aren’t the best. I would think that a 18 yo would have allot less problems with learning C. But still the learing curve is steep.

In middle school I took one class of programming… just for fun. Class full of children ranging 11 to 13 year olds. :smiley:

First half year we learned to use:
DrScheme: http://www.plt-scheme.org/software/drscheme/

  • it a simple software that comes with it’s own IDE, compiler and language.
  • Good for people (children) that have ZERO knowledge of programming.
  • We followed worksheet handouts, but I’m sure you can find them on google.

Second half Year we moved into Java.

yeah i’m gonna take a computer science class I think they teach you Java in there.Also a webmastering class for HTML and other stuff

I was 8 :slight_smile: TRS-80 Color Computer. Assembly Language was the way to go for high performance, 320x240, 8 color graphics! Now a single game character takes up more memory than 100 of those computers had.

I completly agree with this, python is a great starting language. It’s easily understandable and just need to install IDLE (comes with python) to start coding.
I recommend that you go here http://wiki.python.org/moin/BeginnersGuide/NonProgrammers?highlight=(BeginnersGuide%2F)
and do the nonprogrammers tutorials first.