First of all, greetings to everyone. This is my first time posting, hopefully of many to come. I've been reading the material around here for a while but never got around to posting before. Anyway, heres the problem:
The code: http://pastebin.ca/481492
I'm having a problem in line 128. Right as the sprite class constructor begins. The compiler spits this at me:
Return type specification for constructor invalid
New types may not be defined in a return type
Quote:
class sprite
{
private:
int x, y, xvel, yvel, phase; //Determines sprite position offsets and velocity
public:
sprite(); //Constructor
void handle_input();
void move ();
void show ();
}
sprite::sprite()
{
//Initialize offsets and velocity
x = 25;
y = 385;
xvel = 0;
yvel = 0;
phase = 0;
}
As you can see I'm not defining anything. I have no idea whats wrong here, the problem must be somewhere else in the code? I'm lost here.
Yes, there are other errors but I need to get past this one first and yes the code is not quite complete but still, what the hell is up with this one?
Hopefully you guys can give me a hand here...