Classes

ah I love learning about classes
but why make classes , why not just functions *_*
Because you then have C.

Let's say you're making a game.

The game will have 4 players. You can have a CLASS and just initialize players like this:
1
2
3
4
player.Init();
player2.Init();
player3.Init();
player4.Init();


Or you could pass each struct's object (C) by reference to a function.

playerinit(&player); etc. You see what I mean?
You went straight into my mind :)
yep I got it, nice explanation.
Topic archived. No new replies allowed.