I have this code:
Code:
241 class Ball{
242 public:
243 int x;
244 int y;
245 int yVel;
246 int xVel;
247 //The direction 1=right,up 2=right,down 3=left,up 4=left,down
248 int dir;
249 void SetP(int px, int py, SDL_Surface* bi);
250 void draw();
251 SDL_Rect box;
252 SDL_Surface *image;
253 };
254
255 void Ball:SetP(int px, int py, SDL_Surface* bi){
256 x = px;
257 y = py;
258 box.x = x;
259 box.y = y;
260 box.h = BALL_HEIGHT;
261 box.w = BALL_WIDTH;
262 image = bi;
263 }
when compiled:
Code:
matio@matio-desktop:~/Projects/SDL/BREAKOUT$ g++ -g breakout.cpp -o breakout -lSDL -lSDL_image -lSDL_ttf
breakout.cpp:256: error: function definition does not declare parameters
whats wrong?