Question:
How to learn C++ . . . . . . . . . . . . . . .?
Marcus Head
2012-11-28 11:22:37 UTC
I am a complete beginner to programming and I want to learn c++. Please only people who know how to program in c++ answer. How did you learn? Can you suggest books or websites? Did you go to school for it? Is it possible to learn without going to school? Thanks
Five answers:
Mike T
2012-11-28 11:32:10 UTC
Well, I learned in college when my school switched over from Pascal to C++ during my studies.



C++ is not really all that difficult, you just need to get some program examples going and then take them apart and play with them. I still feel that the best way to learn is to get a working program and then start modifying it and experimenting with it. Like I said the language itself is not all that difficult but you may have more trouble with the object oriented programming methodology.



These two sites are really good, give them a try (Their creators put a lot of work into them):

http://www.learncpp.com/

http://www.cplusplus.com/doc/tutorial/



Well then two of the foremost authorities on C++ are Bjarne Stroustrup and Scott Myers.

I would not recommend reading any of Stroustrup's books to start with as they tend to rattle on in theory and are very dry. Scott Myers is an excellent author but his books are more of how to do certain things correctly or more effectively (excellent books though!). You do have to be very careful as a lot of so called C++ books are just re-labled C books (at least the early ones were).



The Stroustrup Books

http://www.amazon.com/C-Programming-Language-4th/dp/0321563840/ref=sr_1_1?s=books&ie=UTF8&qid=1354204341&sr=1-1&keywords=stroustrup

http://www.amazon.com/Annotated-C-Reference-Manual/dp/0201514591/ref=sr_1_10?s=books&ie=UTF8&qid=1354204341&sr=1-10&keywords=stroustrup

http://www.amazon.com/Programming-Principles-Practice-Using-C/dp/0321543726/ref=sr_1_1?s=books&ie=UTF8&qid=1354204722&sr=1-1&keywords=stroustrup+programming



Excellent Books by Scott Myers

http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876/ref=sr_1_1?s=books&ie=UTF8&qid=1354204502&sr=1-1&keywords=scott+myers+c%2B%2B

http://www.amazon.com/More-Effective-Improve-Programs-Designs/dp/020163371X/ref=sr_1_3?s=books&ie=UTF8&qid=1354204502&sr=1-3&keywords=scott+myers+c%2B%2B

http://www.amazon.com/Effective-STL-Specific-Standard-Template/dp/0201749629/ref=sr_1_2?s=books&ie=UTF8&qid=1354204502&sr=1-2&keywords=scott+myers+c%2B%2B



I like hands on tutorial type books when learning a new language. Deitel and Deitel are usually good books in that aspect. Years ago I owned a copy of "C++ How to Program by Deitel and Deitel" Give it a look over. I would definitely start with a book like the one below and then if you want more background, theory or pointers then go for some of the books above by Stroustrup or Myers.



http://www.amazon.com/C-How-Program-7th-Edition/dp/0136117260/ref=pd_vtp_b_1





Good luck!
Cubbi
2012-11-29 02:21:09 UTC
If you want a trusted, peer-reviewed, list of C++ books, use this one: http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list



In general, I recommend C++ Primer 5th edition as the best beginner book today (never Primer Plus), but If you are a complete beginning to *programming*, and not just C++, your best bet is probably Stroustup's "Programming: Principles and Practice using C++", which is written specifically as a textbook that teaches programming using C++ as a vehicle.



It is possible to learn C++ without going to school, but most advanced jobs in programming, especially in C++ programming (think stock exchanges, high-frequency trading, military, physics, cutting-edge tech of any kind), require higher education, typically math background.



And since you ask for personal stories, I learned C++ in bits and pieces as it was being developed, before there were any textbooks, but I only understood it after going through the first edition of Effective C++ (and later, understood it again after reading Alexandrescu) You will need to read it (and the rest of Effective and Exceptional C++ series), but only after you learn some of the language.
kleinebre
2012-11-28 19:39:18 UTC
If you're a complete beginner, I would suggest starting with a more forgiving language. Also, C++ isn't a language that offers you a lot of help in accomplishing your goal. A lot of things that happen automatically in other languages, you have to do manually in C++. I'm talking about the most elementary of things such as initializing variables and memory management. Even as a seasoned programmer, I had my share of trouble getting to terms with C++ (specifically to get it do do more than just reading input and writing output, like they like to make students do at uni).



I'd suggest starting with Java or even JavaScript - their syntax looks roughly similar to C++ but they're much more forgiving. For javascript, the w3schools.com site is excellent.



Having said that, learncpp.com looks like a fairly good starting point for learning C++.

Once you want to get into graphical stuff, you'll need to get to terms with a GUI toolkit such as Qt or FLTK.



It is possible to learn programming without going to school, but it helps a lot if you have someone that can show you how.
tbshmkr
2012-11-28 19:48:06 UTC
In school: Some C && Some C++ PRACTICE , do exercises/problems

=

Programming: Principles and Practice Using C++ by Bjarne Stroustrup

- An Introduction to Computer Programming with C++ by the Inventor of C++

- http://www.amazon.com/Programming-Principles-Practice-Using-C/dp/0321543726/

=

Tutorials online:

- http://www.cprogramming.com/tutorial/c++-tutorial.html

- http://www.cplusplus.com/doc/tutorial/

=

Code::Blocks == Open Source C/C++ IDE

- codeblocks-10.05mingw-setup.exe

- http://www.codeblocks.org/downloads/binaries
Charlie Tuna
2012-11-28 19:28:46 UTC
I learned C++ with this book from Stephen Prata -> http://www.amazon.com/C-Primer-Plus-5th-Edition/dp/0672326973/ref=sr_1_1?ie=UTF8&qid=1354130639&sr=8-1&keywords=c%2B%2B+prata



using the free Microsoft Visual Studio Express 2008 and 2010



Even at 1224 pages, this book only covers the basics of C++, don't expect to write an operating system after reading the book. For that you need to practice and read source code from other programs on the web.



No school is necessary if you are really committed to learn.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...