Page 1 of 1

Learning C/C++...now what?

Posted: Thu Feb 07, 2002 12:17 pm
by Jordan_C.
:oOk, I'm gonna learn C/C++ here pretty soon( 8)) [I found some GR8 materials...]. Is there anything in particular that I should really be focusing on while I learn it [that has to do with OSDEV, or good programming]?
TXS.

Re: Learning C/C++...now what?

Posted: Thu Feb 07, 2002 3:11 pm
by K.J.
Well, when I learned it(I came from a QB background like you), I found that the hardest thing to learn was the deal with no string like in QB. Instead you have to make an array of charactors to hold your strings and remember that the array starts at zero not one. Also, don't I repeat don't get into the C++ stuff until you have mastered C.

K.J.

Re: Learning C/C++...now what?

Posted: Fri Feb 08, 2002 7:10 am
by shadowwolf
I learned C++ then C and actually it made all of the difference.

C++ is more object oriented than C is, so you really have to re-learn it anyways.  Thinking of them as similar languages is what causes 99% of the problem -- It makes no real difference which one you use.

Re: Learning C/C++...now what?

Posted: Fri Feb 08, 2002 10:06 am
by Jordan_C.
I'm learning from software, and it says C/C++, so I suppose it would do C then C++, but I'll skip the C++ if it's not in order, at least until I learn C. TXS

Re: Learning C/C++...now what?

Posted: Mon Feb 11, 2002 8:08 am
by ark
I would say learn C++ all the way, but unless you've already done object-oriented programming don't get into the object-oriented aspects of C++ until you've mastered the procedure-oriented aspects of it.

C is definitely a different language from C++, despite their very similar (and mostly compatible) syntax. C++ is cleaner, in my not so humble opinion, particularly with regards to memory allocation and type casting.

Make sure you grasp pointers absolutely and completely. Don't go anywhere with this language until you understand them. Along with the power that C++ provides you comes the power to shoot yourself in the foot. Pointers let you do some useful things but also some nasty things. Once you understand pointers, the rest isn't terribly difficult.