Any general tips on programming C++?[/b]
If C++ is one of your first languages, not a bad choice (I learned C++ before HTML, although to be honest that's a bit of a fluke). The syntax is not very complicated and once you learn that you'll realise so many other languages share the same sort of syntax - but syntax takes practically about half an hour to get to grips with and a few days to be entirely fluent in so don't consider that too impressive like a lot of [dumb] people do.
Like Ynot said, what you REALLY need to get your head around is object oriented programming. While I don't, and any half decent programmer won't, consider it the holy grail and method to end all methods, you are going to do yourself a huge favour if you can understand that. This does not apply specifically to C++, but almost any decent language these-a-days deals with OOP. C++ doesn't do the world's best job of helping an object-oriented programmer, but it can work.
C++ is actually a dangerous language in the sense that it can do just about anything, but it does not take much to get complicated or completely obtuse and end up repeating yourself and code and over again. If you find C++ to be a bit infuriating in that you seem to be putting everything together from scratch or dealing with reams of code that perform simple things, you might want to try a 'softer', but equally interesting and rewarding language like PHP.
I would suggest, once you get up to scratch, and it won't take long (I recommend the 'C++ Primer' book which goes through just about everything on the planet, including the STL) you take a look at a "serious" project like BZFlag, which is an open source game - fun too - and consequently you can get the code for it and see how C++ "works". I find that you can do so many tutorials before you begin to wonder if something substantial can be made of it other than dumb little examples, so looking at someone else's source like that is always good.
And remember, pointers aren't half as confusing as people say they are!
|
|
Bookmarks