[ACCEPTED]-What is the best way to learn C++ if I have a bit of other programming experience?-c++

Accepted answer
Score: 25

Bjarne's book is fantastic, especially for 14 C++ syntax, but the one book that will really 13 make you a competent C++ programmer is Meyers' Effective C++. Get 12 it. Read it.

I as well do not have a CS degree, but 11 I work for a silicon valley startup. It 10 is possible, you just have to be aware of 9 what's out there and never stop learning. Many 8 students who graduate with a computer science 7 degree end up working in a language they 6 didn't study, so be sure to hit the fundamentals. If 5 you hear something that's unfamiliar to 4 you, be sure to find a good book and a coffee 3 shop and get to it. The C++ will come in 2 time - with Stroustrup and Meyers, you've 1 got 90% of what it takes to be good at C++

Score: 16

My usual advice is to keep C and C++ separate. Don't 4 assume that C advice or best practices apply 3 to C++, and vice versa. Keeping that in 2 mind will probably help you avoid a lot 1 of bad habits.

Score: 5

One of the critical things to really become 16 better is to others have a look at your 15 code. When others say 'WTF' to your code, you 14 can improve it and learn from your mistakes.

Try 13 to use code analysis tools, try to use C++ conventions 12 (for example google's http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml), try to use valgrind 11 for memory leak detection. Learn how to 10 write Make scripts manually, try some cross 9 platform compilations to see what parts 8 are tricky.

You might also want to take a 7 look at some popular libraries such as boost.

As 6 of the project, make it opensource so people 5 can look at it and give you suggestions. To 4 really incorporate your lack of CS education, grab 3 a scientific paper and try to implement 2 it using c++. Check the results and compare 1 them.

Score: 4

I don't htink the Stroustrop book is a good 6 place to start. It's more of an advanced/reference 5 book. I would start with Thinking in C++ (Volume 1) (and Volume 2. And write 4 lots of code. Once you've got a basic handle 3 on the code I would get the Scott Meyer 2 Effective C++ books and definitely the Stroustrop 1 book.

Score: 4

Here is the reading/learning list I suggest

  • First read Thinking in C++ first edition (get the syntax straight)
  • Read Scott Meyer's book Effective C++ (get the finer nuances)

After 17 which you can branch out to the following. You 16 can skip all except maybe 1st. You may use 15 boost, STL, whatever to learn these 1 Learn 14 to use strings & other containers (know 13 when to use which container) 2 Assuming 12 you already know XML, learn to use XML from 11 C++ (Write a WBXML to XML translator 10 maybe) 3 Review your TCP/IP fundamentals, (write 9 simple XMPP based chat client maybe) 4 You 8 may wish to learn some GUI toolkit GTK+, Qt, MFC, whatever

At 7 this time you may want to branch out into 6 reading about design patterns. I recommend 5 'Design Patterns Explained'.

Once you've 4 spent over an year working with C++ you 3 may want to read, among others, "Inside 2 the C++ Object Model".

Also, I don't recommend 1 that you read Stroustrup but YMMV.


Score: 2

Learn Qt. Trust me on this; I develop all 13 kinds of C++ app for a living. C++ with 12 Qt makes you infinitely more productive. I 11 used to combine so many different libraries 10 (Boost, Intel's, database connectors, etc..) just 9 to achieve the kind of stuff we do (high-performance/real-time 8 computing). At the end, I found that more 7 than 80% of what I need is already included 6 in Qt.

Not to mention, imo, Qt has the best 5 documentation on any framework/library I've 4 worked on, which makes it very easy to just 3 learn everything on your own.

Try it, and 2 see for yourself.

Disclaimer: I'm just a 1 developer--I dont work for Nokia. =p

Score: 1

Sounds good to me. Get to it!


Score: 1

Sounds like you're on the right track;

1) Set 9 yourself mini-projects of ever increasing 8 difficulty (Hello World, Lottery Picker, Etc 7 Etc)

2) Find a good book or two that contain 6 exercises and can be used as a reference.

It's 5 been about 15 years since I read it, but 4 I seem to recall that the Stroustrup book 3 wasn't exactly the friendliest of the "how 2 to learn..." C++ books. You may want to 1 spend some time on Amazon and do some comparisons.

Score: 1

Quite frankly, if you've done a good job 5 of learning C, and you've done object oriented 4 programming (since you've learned objective 3 C), you don't need to overthink your approach 2 to learning C++.

That said, your plan is 1 good.

Score: 1

If you have a strong handle on C, then C++ is 12 not a huge leap once you have a good handle 11 on the OOP concepts....which hopefully you 10 have from becoming proficient in Python. Coming 9 from C, the biggest thing to learn in C++ is 8 really getting familiar with the Standard 7 Template Library (STL) and all the subtle 6 things come along with using it.

Personally, I 5 think the Stroustrup book is not all that 4 great for learning the language, it's more 3 of a reference. I would recommend C++ Primer Plus as a 2 better book and the Effective C++ books by Meyers for really 1 learning to use the language coherently.

Score: 1

Also be sure to check out How Not to Program in C++


Score: 1

There are dozens of Learning Styles. You've picked one 12 that you think will work for you.

Do you 11 have a specific question or problem? For 10 instance, was your question really a plea 9 for additional or different books? Without 8 you asking something more specific than 7 "Thoughts?", you might not get 6 many responses that actually fit what you're 5 actually looking for.

Programs, BTW, are 4 goal directed. Your learning to also be 3 goal directed. Your questions, similarly 2 must be goal directed. Programming is about 1 tangible, concrete specifics.

Score: 1

If you're on this Stroustrup book:

The C++ Programming 4 Language

And finding it hard going... which 3 it can be. You might want to switch and 2 start with this one instead:

Programming 1 -- Principles and Practice Using C++

More Related questions