Heyyy, haven't used DarkGDK or C++ in a while and I seem to have forgotten everything
Just a few problems, I made a class (Player) in a .h file, included it and tried building:
PlayerClass.h:
class Player
{
private:
public:
int number;
Player()
{
number = 10;
}
~Player()
{
}
}
Game.cpp:
#include "DarkGDK.h"
#include "PlayerClass.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
//Player player = new Player();
while ( LoopGDK ( ) )
{
dbCLS();
dbPrint( "Hello" );
dbSync ( );
}
// return back to windows
return;
}
Error 1 error C2628: 'Player' followed by 'void' is illegal (did you forget a ';'?)
Error 2 error C2556: 'Player DarkGDK(void)' : overloaded function differs only by return type from 'void DarkGDK(void)'
Error 3 error C2371: 'DarkGDK' : redefinition; different basic types
What am I doing wrong?
Don't make war, make tea.