S
SpiralCorp
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"
******************
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?
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"
******************
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?