Best way to learn c++ ?

Hey guys ..

I've been studying c++ for about 2 months now and I think that I'm not learning anything, for example when I tried to solve problems in :

http://projecteuler.net/

I only solved 3 problems and even problem 3 I solved it but not in the correct way.

I mean it's been 2 months and I couldn't solve anything above problem 4 !! and I only learned " beside the basics stuff such as errors and precedence " , I learned functions " basics stuff " and loops + if/else + switch.

am I in a rush to learn ? or the fact that I'm not learning anything ?

I thought of buying a book to study on weekends, and I wanted to ask , should I buy a book called "Sams Teach Yourself C++ in One Hour a Day" or there's another book that you guys think that I should get ?

Thank you.

Project Euler is not necessarily good for improving your programming. They also rely on you having decent maths right from the start and the difficulty of the problems increases very quickly, from a mathematical rather than programming perspective.

You would be far better off doing small projects, which will force you to practice what you have learnt already and to learn more stuff. Here are some suggestions:

Make a simple number guessing game - User enters number, computer tries to guess it.
Make a program to store, shuffle & output a standard deck of cards.
Make a basic calculator.
Create a game using your deck of cards.
Create a game that allows users to create an account and have high scores and save all the accounts and scores in a text file.

If you want to move on to learning different libraries, perhaps you can suggest what exactly you would like to achieve in programming and we can give some helpful suggestions.

Of course they are just my suggestions and you can do whatever you want...
I can only say that there is necessarily no "PERFECT" or "BEST" way in general. It varies from person to person and the time they take to understand the skills they acquire. I also suggest what Mats already suggested-take up easy ones and then slowly and patiently move to difficult ones.

Also, you said you've been programming since the last two months only. So, it's likely that you still haven't learnt about various advanced topics like data structures, algorithms, OOP concepts, etc. and hence are a bit troubled at the moment.

Cutefriendzoned wrote:
should I buy a book called "Sams Teach Yourself C++ in One Hour a Day"

You might, you might not. But there's no alternative to thourough and technical reading. Even Bjarne Stroustrup agrees in his well known book, The C++ Programming Language, that still after 20+ years of C++, he's still in awe how C++ has so quickly and constantly eveovled and is still evolving.

Hope I didn't bore you or bias your mind.

EDIT:
If you want a good one, be sure to also pick Thinking in C++ by Bruce Eckel.
http://www.amazon.com/Thinking-Introduction-Standard-Volume-Edition/dp/0139798099
Last edited on
Thanks man , I'm just worried that I'm not learning anything , or I'm learning really slow.

I mean it's been 2 months and we just started on learning basics functions " calling it and creating it"
If you think that's bad then read this: I started C++ only last year and still have many things to learn. My teacher doesn't explain any doubts and she just copy-pastes book codes and never explains any logic behind the codes. I have no one except C++.com and other forums and a few seniors to turn for help and sometimes even that's not adequate. So, I'd say you're better off. Learning functions in the 2nd month doesn't make you slow.
@The illusionist mirage

Thanks for replying man , that means a lot to me.

I'll take a look at the book that you suggested.

I also want to point out that I opened this thread because when I see a code , in complex problems " at least for me " I don't usually understand it , and that really bothers me , and I think to myself that I'm not learning anything.

I usually work on 3-6 programs " small ones " such that guessing games and stuff like that , they're easy to solve.
@The illusionist mirage

that sucks man , I got the same prof that you have" the way he explains" , he only reads and then says that we suck at programing and stuff like that " I'm not even joking " I sometime thinks of skipping the class and go learn myself.
Last edited on
Topic archived. No new replies allowed.