I want to learn c++

I've decided I want to learn c++. I know basically nothing. I currently have a macbook pro, do I need a windows computer for it? What programs do I need to write the code and where can I learn it?

Thanks beforehand.
You should be able to use your MacBook. AFAIK the most popular IDE on Mac is XCode.
http://www.cprogramming.com/xcode.html
https://www.youtube.com/watch?v=FzuDUnoNQo0
for a program to practice with, visual basic is a very good program to use to write code in. That's what I'm using for my principles of programming and logic class. It's free as well. Also if you don't like visual basic try Dev C++ for a program, both are free and work well.
Last edited on
cplusplusnewb89 wrote:
Microsoft Visual Basic Studio is a very good program to use to write code in

Visual Basic is a programming language with no relation to C++. Visual Studio is the IDE.

If OP is running an Apple system, he should probably use XCode rather than a Microsoft product or Dev-C++ (which only runs on Windows). OP has a significant advantage by not learning on a Windows machine and there's no reason to take that away. Alternatively, if OP is comfortable with the command line, the only thing he or she will need is a text editor and a compiler -- that is, LLVM/Clang, and TextEdit, which should be installed already. This is enough because a C++ program is nothing except a specially-formatted text file that you give to another program (called a compiler) to produce something you can run.

The tutorial on this site is a quite alright starting point, if a little fast and margnially out-of-date.
http://www.cplusplus.com/doc/

If you are looking for a book, I will recommend Bjarne Stroustrup's Programming, Principles and Practice Using C++, with the caveat that I haven't read it.
http://www.stroustrup.com/programming.html
Stroustrup is an eminently qualified author, and I have good reason to expect the book lives up to its reputation.

A warning:
There are far too many bad resources. The language changes rapidly and there are many authors who apparently don't know what they're talking about. Make sure that the resources you learn from are reputable.
Last edited on
If you are looking for a book, I will recommend Bjarne Stroustrup's Programming, Principles and Practice Using C++, with the caveat that I haven't read it.
http://www.stroustrup.com/programming.html
Stroustrup is an eminently qualified author, and I have good reason to expect the book lives up to its reputation.


I would not recommend this book for a beginner. It gives the readers lots of difficult exercises - telling them to look for solutions on the internet. A good book should teach the readers problem solving skills so they can solve the problems on their own instead of becoming dependent on Stackoverflow or this forum.
Thomas1965

What book would you recommend me?
My personal favorite, and I've said this many times here already, is 'C++Primer Plus (5th ed.)' by Stephen Prata - it does not cover the changes incorporated into the language since C++11 but is very good on the basics with lots of examples and exercises.
Once you've mastered the material in this book you should be able to update yourself to C++11 and beyond quite easily and for this 'The C++ Standard Libraray (2nd ed.)' by Nikolai Josuttis' would be an excellent choice but only tackle this after you've got the language basics sorted. It is not a beginners' text-book
> I've decided I want to learn c++. I know basically nothing.
>> What book would you recommend me?

Strongly recommended (assuming that you have no prior programming experience):
Beginner

Introductory, no previous programming experience

Programming: Principles and Practice Using C++ (Bjarne Stroustrup) (updated for C++11/C++14) An introduction to programming using C++ by the creator of the language. A good read, that assumes no previous programming experience, but is not only for beginners.
http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list?answertab=active#tab-top


Otherwise, consider
C++ Primer (Stanley Lippman, Josée Lajoie, and Barbara E. Moo)
or Accelerated C++ (Andrew Koenig and Barbara Moo)
mentioned on the same page under 'Itroductory, with previous programming experience'
I have a Macbook Pro as well and use Xcode. I like it the best and it very easy to use. You can use Terminal to compile and run program. If you need help on how to do it, just let me know.
why don't you learn from this site ??(I learn most of the basic stuff from this site..)
What has helped me get the basics is using Youtube Tutorials. Seeing the code and hearing the explanations beats working from a text book. And using this site as an aid, you can go from topic to topic finding videos and building your knowledge.

I will work through the demonstrations and do notes of my understanding of the program, and then copy and execute the code; then play with it and from there take revision notes with questions and answers and move onto the next thing.
And when I have enough knowledge of a topic I will create my own practical program to see if I've mastered it.


I figured there is a big amount of learning when you play and also when the thing doesn't work and you have to either find out what went wrong or try a different model from some other video. I think a lot of the hardcore learning is when it goes belly up.
Topic archived. No new replies allowed.