Problem with multiple class files, main, and pointers.

Okay, I have a small declaration/reference problem in my main.

1
2
3
4
5
6
7
8
9
10
11
  int main(int argc, char *argv[])
{
        Initialize mainkey;
        mainkey.Initial();


        Overworld key;
        key.LoadBG();
        key.DisplayBG();
    }


This is my current main, just to check if each function within each class works.
The problem is, the function DisplayBG(); is declared in my class file as
SDL_Texture* DisplayBG ();

How do I reference that function properly in my main? At the moment I get an undefined reference error.
If DisplayBG() is a public declared method of Overworld then everything should be fine. Please post Overworld class specification.
I'm guessing you haven't included the definitions of either Initialize or Overworld.
Topic archived. No new replies allowed.