
But thats it, so is there a good composition of major changes between c and c++, and how to switch? or do i have to start learnign from scratch now?
For the Ogre Tutorials i didn't have huge problems understanding them or the syntax.
thx so far, any good recommendations where you would look for information?Waruck wrote:I think the most difficult problem is to get into classes and oop not into the syntax.
An example:
In a game you would perhaps have different characters, lets say humans, elves, dwarfs and orks. But you don't really want your game check what kind of character you're dealing with every time. So what you do is define a base-class 'character' which all the other classes inherit from. Now you could have an character-creation class, that takes an id and creats you an character defined by that specific id. you don't have to care about what race the character is, just treat him like any character. Because it's class is derived from character everybody can see him just as a character, but he acts like its specific race(class).
If you want to get into oop with c++ here are the things I would recommand you:
1. learn about classes and what you can do with them. Learn what inheritance means and what virtual classes are. This is the core of oop.
2. learn about the standard-template-library (stl). Especially about the different containers and how they can be used (vectors, lists, deques, maps...). You'll deal with huge amount of objects and must know how you can store them.
3. learn about design-patterns. These are commonly used patterns how you can use classes in a specific relation to solve specific problems. The pattern in the example above would be a factory-pattern. If you understand these patterns and more importantly why they are useful you'll learn what oop really means.