I'm sure this is obvious to you smart types but.
main has an array:
and i'm trying to pass pieces of that array to the player object.
Protoype:
Code:
void shoot(const Bullet &bull); //line 37
Code:
void Player::shoot(const Bullet &bull){ //line 44
if(bull != NULL){
bull = new Bullet(loc.X+1, loc.Y,LEFT);
}
}
and i'm getting:
Code:
37 C:\Program Files\Dev-Cpp\Projects\shootmain.cpp expected `,' or `...' before '&' token
37 C:\Program Files\Dev-Cpp\Projects\shootmain.cpp ISO C++ forbids declaration of `Bullet' with no type
45 C:\Program Files\Dev-Cpp\Projects\shootmain.cpp expected `,' or `...' before '&' token
C:\Program Files\Dev-Cpp\Projects\shootmain.cpp In member function `void Player::shoot(int)':
46 C:\Program Files\Dev-Cpp\Projects\shootmain.cpp `bull' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
47 C:\Program Files\Dev-Cpp\Projects\shootmain.cpp `Bullet' is not a type
C:\Program Files\Dev-Cpp\Projects\Makefile.win [Build Error] exe: *** [Objects/MingW/shootmain.o] Error 1