How did YOU learn C++?

Pages: 12
Hello members of Cplusplus forums.

I am planning on learning C++ programming from a book, but am a little intemidated by it. The book is called C++ Primer Plus. I've read the first chapter or two and it seems to be a decent guide on C++ (Tell me what you think about it if possible). Now let me get something clear right here, I'm not the "I kinda wanna learn it" guy or even the "I wanna try and learn it" guy. I'm the "I desperately want to learn this, no matter how long it takes." guy. (I have ALOT of free time at the moment.)

So the question is basicly "How did you do it?". As previously mentioned I am a bit intemidated (The book is a little over 1,000 pages long). So I would really like to know from someone who has learned it how they did it, and some advice for a complete newbie how to even start.

Things like taking notes, practicing, etc. Would be very helpful and much appreciated.

Thanks,
Dividan.

I started with C++ in easy steps. They really were easy steps. It gave me a good foundation and the basic skills of C++ in an easily learnt way.

http://www.ineasysteps.com/books/details/?9781840783520

Then I got the C++ Bible. This was more like a reference book and hell to learn from - Don't get a bible to learn from. They are a good reference though.

http://www.amazon.com/Standard-C-Bible-Al-Stevens/dp/0764546546
Last edited on
By pure chance, I happened to be the technical editor for the translation of Effective C++ into a different language. Back then, in 1999, C++ was only one year old, and I still didn't know what to make of it, but going through that book word by word broke the ice.

Get rid of Primer Plus, it gets terrible reviews by professionals.

The recommended books today are:
Accelerated C++ (Koenig and Moo) - the first actual C++ textbook
C++ Primer (Lippman, Lajoie, and Moo) - the most detailed C++ textbook
Thinking in C++ (Eckel) - available online for free
Programming: Principles and Practice Using C++ (Bjarne Stroustrup) - programming textbook which teaches C++ along the way.

All those authors are also the authors of C++ (it wasn't just Stroustrup)

references:
http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
http://jcatki.no-ip.org/fncpp/Resources
Last edited on
So besides books, what other options are there for learning C++? Are there mentors or classes as well?
Reading, building, failing, and these forums :)

First I will tell you the wrong way to learn (I know from experience... don't try this -_-)...
Never directly follow those step-by-step tutorials.. yes, they show you how to build something fast, but you won't learn near as much then if you try to figure it out yourself by piecing together each statement yourself.

I am not saying that all tutorials are evil, just don't rely on them too much.

This may sound odd, but another good way to learn is when you build a program that completely fails. When you fail, you learn what to do and what not to do.

When you feel comfortable, think of some basic console programs that you could build like various calculators, text based games, and other pointless but fun programs!

Enjoy learning C++!
For beginners I would recommend either C++ Primer or Thinking in C++. For intermediate to advanced I would recommend Effective C++ and Accelerated C++. There is a More Effective C++ I think.

I like Effective C++ by Scott Meyers because those items presented are questions he get from his training classes students. Over the years he compiled them into one. This is good because a lot of items are not really covered in much detail in most introductory or C++ books.
Wow thanks, that's really helpful. So how about time investment, what's the estimate of the time it took you to get mid-level into C++?
如果你有c语言的基础,选择一本合适的C++书籍。仔细阅读一遍,并把书中的例子都调试通过,大概2个月的时间。这只能算是入门。然后在找一本面向对象编程方面的书籍学习,这个要2个月的时间。再完成一个10000行左右的C++项目,才可能达到mid-level。整体来讲应该12个月。
Last edited on
I also strongly recommend "Accelerated C++"!
In addition, consider the books from this list: http://www.parashift.com/c++-faq-lite/how-to-learn-cpp.html#faq-28.4
Shefon84 wrote:
How did YOU learn C++?

By reading Prata's book. It's an awesome book and it's very easy and very fun to read. Don't be intimidated by its size. If you're determined to learn, it won't take you more than a month or two to finish it. I am aware of all of the other books mentioned here, and, honestly, if I had to forget C++ and relearn it, I'd choose C++ Primer Plus again. And then, if I had to forget C++ and relearn it, I'd choose C++ Primer Plus again.
Last edited on
i just guessed what to do
The only thing I have EVER used to learn C++ is this website, googling for code snippets, and asking various questions to my more knowledgeable friends. I have a very good understanding of the language and programming in general now :)
Rough translation of Tralon's response:
If you have a base in C, choose a few suitable C + + books. Read them a few times and work through their examples, this should take about 2 months. Then find a few books on object oriented programming and do the same, this should also take 2 months. Then, after having written about 10,000 lines of code, you will be a mid-level C++ programmer. The whole process may take around 12 months.


Now, while I wouldn't specify a line count that one should get to before calling themselves an any-level C++ programmer, I cannot say enough good things about practice and working through others' programs as a way of learning. That's how I taught myself, along with a little bit of documentation of the language to help me along the way.

-Albatross

Last edited on
I learned the very basics of C++ at school. When I started to learn C++ more seriously on my own I already knew Java quite well. That helped a lot. I learn(ed) C++ from various sources on the web, ##C++ on irc.freenode.net and by reading the standard (draft). I have never followed any C++ book.
I started with Absolute C++ and Programming: Principles and Practice Using C++. Then it comes down to doing lots of coding.

Once you have that under the belt, though, what I would really recommend is C++ Common Knowledge. It was a really excellent book for taking me up a level in understanding and (eventually) ability.
Thank you to everyone who has responded to Shefon84. I was wondering the same thing. This thread has been most helpful in getting started.
Sorry for late answer but:

When i bought my first book about C++, i didn't have patience to start reading, learn to programming and write my firsts programs. You aleardy have the book, why are you intemidated ? Start, don't lose time. Time is irreversible.
Thanks Kanghu, after some thinking about it you were very right about it. Time is irreversible. For anyone else who sees this forum feel free to keep posting ways you learned C++. I'd like this forum to help all new people. :) Thanks.
In school aeons ago they hit me first with MS Fortran 5, then borland turbo assembler (TASM), then borland turbo pascal, then borland turbo c, then borland turbo c++. I never did bother taking any courses in vc++ but perhaps it would have been beneficial. I never did end up programming for a living at any rate. I use it as a hobby to try to retain what I know and keep up with changes. I learn much faster/better when I learn while doing. I have since then of course read a few books (C++ Programming Language 3rd Ed for one) to update things like templates and the STL.
// im still learning.
But, yes i started by going to school. While going to school i would do the assignments and just mess around with it by try different ways of doing the same thing. Forums help a lot because they give you a different view. Just dive in to it and you will find yourself enjoying it.
Pages: 12