how to learn C++ ?

Write your question here.
Book learning ? I have three books. What I'm really looking for is finding out if my dinky code is efficient, readable enough, also well organized
( my classes are layed out correctly ). I'm posting in the right forum ( I am a beginner ).

I have the idea that with experience I will get better but I know I have bad coding habits. In the mean time what should I be doing ?

Hope you can help,
I see that the title to my post is not very precise. It could be
"how best to learn C++"
From reading this forum, I find good help on mostly coding question.

Here's a question for you, just from reading code and books, is it enough
to become proficient at coding and algorithm ?

I guess this has been answered ad noseam before, just point me to the
right article, post or web site.
My boss says "if you would be so kind" :)
Here's a question for you, just from reading code and books, is it enough
to become proficient at coding and algorithm ?

No. You need to design and write your own code before you can even hope to become proficient.
Reading the books is important. I read my first C++ book over a summer, sometimes during my shift when it wasn't busy, and practiced writing code after my job at home. But like jlb said, you need to actually practice it hands-on, you won't be able to absorb everything just by reading. I remember how even something like a for loop used to seem like this bizarre, complicated concept, but now it's something I could do fluently and without thinking.

Good class design is something hard to do, and even a lot of professionals don't know how to do it proficiently if it's anything complicated enough. If you're new, I wouldn't really worry about that, yet.

I mean, it's not bad to worry about it, but learning how to organize code well and make it readable is something you really have to learn by doing, which mean probably getting it wrong the first time and then realizing "Oh, I should have just done it this way!". Or, you want to expand a part of your project, and you realize the current structure really makes this hard, so it's better to just redesign the module.

Once you've learned the basics of the language through reading and practicing exercises, then you could look up blogs and other experienced people's tips on how to best organize code, and learn different tried-and-true code design principles.
Last edited on
Here's a question for you, just from reading code and books, is it enough
to become proficient at coding and algorithm ?

Something my teacher used to say, you can watch someone play the piano proficiently but you won't be able to play the piano yourself if you don't practice on your own.

Read the book, do the exercises, create your own side projects, and slowly you will become competent.

If you want a good book about code organization, I recommend "Game Programming Patterns by Robert Nystrom" Link: https://www.amazon.com/Game-Programming-Patterns-Robert-Nystrom/dp/0990582906

You will still learn a lot from it even if your main focus is not games development. The book is one of my favorite books I have ever read.
People,
Thank you all :)
All four of the helpfull people have answered giving mainly the same advice.
Going to Amazon and reading the reviews, I definitely need a new book.
The links to the sites above will be investigated. cplusplus also lists some coding
exercises. New I know a bit more.
Michel Chassey
Have you considered your local community college? Academic instruction can really help you get a good start in programming. As far as refining your skills if you have completed a beginners book I would recommend moving into the intermediate space or possibly finding a mentor who can help you along. An alternative to this would be to develop code and post it asking for code reviews from experienced programmers.
Topic archived. No new replies allowed.