Hi,
Is it 'safe' to assume that any code inside...
void DarkSDK (void)
{
// blah!
}
...is essentially what would go in a usual C++ programs...
?
My overall layout at the moment is something like this...in one file -
1) includes
2) class definitions
3) void DarkSDK
3.0) typedefs, list objects, pointers etc.
3.1) My main loop etc.
...and I wondered if that is normal/ok. Perhaps typedefs etc. need to go after includes rather in 'inside' the DarkSDK loop?
Which then leads to my next question
- in what order are classes, err, evaluated? For example, lets say I have a player class, and a playerbullet class, and the player class is 'friends' with the playerbullet class (because inside the player class it creates a playerbullet object when the player fires). All in the same .cpp, the player class is defined first, then the playerbullet class. But! The player class is told to be friends with playerbullet before playerbullet has been defined, so this results in a C2433 ('friend' not permitted on data declarations?).
[EDIT] if I call the new bullet code in the DarkSDK part as apposed to within the player class it works. But that defeats the point!
Any ideas or suggestions? p.s. if I move my typedefs etc. to after includes I have to have some dummy class definitions up there too, and the error changes to C2514 (class has no constructors), which is kinda more logical in that the player class is trying to construct an object using my dummy class def not the real one.
Cheers in advance