Ok, you seem to be confused about some terms:
1. Class member function declaration:
this is the line that tells your compiler what your funcion expects as parameters and returns as results. In your case:
class Block{public:double destx;double desty;int destw;int desth;int setblock;int pos;bool move;//Function call to draw a sprite.void drawSprite(SDL_Surface *string, SDL_Surface *screen, int srcx, int srcy, int srcw, int srch, double destx, double desty, int destw, int desth); // THE FUNCTION DECLARATION};
This function declaration declares the function in the Block scope, since the declaration is inside the scope of the Block class declaration.
2. Class member function definition:
This part describes what the previously declared function actually does. In your case:
void Block::drawSprite(SDL_Surface *string, SDL_Surface *screen, int srcx, int srcy, int srcw, int srch, double destx, double desty, int destw, int desth){// actual code goes here}
Notice the
Block:: scope specifier. Since we're outside the Block class declaration now, we aren't in the Block scope anymore. So we have to specify that the function we're trying to define is in the Block scope explicitly.
EDIT: code formatting