This week i was working on a console based snake game. i created graphics.h,snake.h and mouse.h classes for my project. in the snake class i had a constructor with a char and graphics parameters and it worked fine. but when i create a constructor for the mouse class with a char and a graphics parameter the compiler says syntax error: identifier 'graphics'.
here is the code for the classes.
Sorry for the case mistake.
in eclipse it says 'Graphics has not been declared' for the constructor and
'Graphics does not name a type' for the declaration of the member variable Graphics &gfx.
i have included the header file 'Graphics.h' in the mouse.h file.