Tips please

I am new to c++ and I would like to know what are some helpful tricks and what not to do.
Last edited on
Well, first off, don't use system("") cause thats evil (refer to Duoas post: http://www.cplusplus.com/forum/articles/11153/ ). I too am a noob, so thats all I can tell ya. :)
read DRY and KISS :-)
Get your hands dirty - start with tutorials on this site and go from there...
The best kinds of tricks and what not to do can only be learnt from attempting to write programs yourself, and finding what works and what doesn't. Also, asing for feedback :)
closed account (z05DSL3A)
I am going to assume that ‘new to C++’ means no prior programming experience.

Don’t be in a rush. Make sure you understand the topic before moving on to the next.

Don’t be in a rush. Most books start you off with console programs, some people try to move on to Graphical interfaces before they understand the basics to a sufficient level. This generally leads to frustration.

NB: I know I have said ‘Don’t be in a rush’ twice, but it is important not to rush.

Don’t think that programming is knowing the language, C++ is just a tool. This may sound odd but bear with me. An analogy; if you think of programming as woodwork then learning C++ is like learning how to use hand tools. You can learn to use a saw and chisel, maybe even in relationship to a mortise and tenon joint, but you need to learn the correct use of such a joint. I only mention this because there are texts out there that do not cover enough programming theory for a beginner (i.e. aimed at the programmer learning a new language).

Do learn how to use a debugger! This is more on the learning programming side but worth mentioning. You can save yourself a lot of time by spending a little effort in learning a debugger.


A good book for a beginner:
Programming -- Principles and Practice Using C++
Bjarne Stroustrup's
Addison-Wesley ISBN 978-0321543721
I might buy that book, written by the man himself.
Topic archived. No new replies allowed.