Header /file module issues
i am presently breaking a program down into seperate source files and writing some small header files also, everything has gone swimmingly but now i am hitting problems with the below..i am sure other problems of this sort will come up as i continue so id appreciate any advice...
this opening entry of my Graphics.h file works fine included in main and everything in there seems to use it fine, but when i include it in other source files i get a list of errors saying each element is being redefined..first defined here..etc.. even when the source file does not so far use anything in the header. on the other hand other headers dont give me any problem being put in more than one source, ...but then they only contain class definitions
Code:
#ifndef GRAPHICS_H_INCLUDED
#define GRAPHICS_H_INCLUDED
SDL_Surface *screen;
SDL_Surface *temp;
SDL_Surface *PegArea;
SDL_Surface *Buttonarea;
SDL_Surface *Gameboard;
#endif // GRAPHICS_H_INCLUDED