I am trying to include my class Artist , whose interface is in Artist.h, in a class called pane.
i try including the header for artist, but my code gives me an undeclared identifier. I've used the Artist before and it worked fine.
Relevant code
Code:#ifndef _PANEH_ #define _PANEH_ #ifdef WIN32 #pragma comment(lib, "SDL.lib") #pragma comment(lib, "SDLmain.lib") #endif #include "SDL.h" #include "artist.h" #include <vector> #include "artist.h" using std::vector; class Pane { public: void draw(Artist&); // this is where the undeclared ID comes from }; and Artist is #ifdef WIN32 #pragma comment(lib, "SDL.lib") #pragma comment(lib, "SDLmain.lib") #endif #include "SDL.h" #include "Pane.h" class Artist { private: SDL_Surface * surface; void drawPixel(SDL_Surface*, int, int,Uint8, Uint8, Uint8); public: void setSurface(SDL_Surface*); void draw(); };



LinkBack URL
About LinkBacks


