   Problem with two header files including each other
  Hi. I'm having problems with two header files including each other.App.h#pragma once#include "Sudoku.h"#include "MainFrame.h"#include <wx/wx.h>#define BOARD_SIZE 3class App : public wxApp{  public:  enum MenuId  {    NEW_VERY_EASY,    NEW_EASY,    NEW_MEDIUM,    NEW_HARD  };  App();  ~App();  virtual bool OnInit();  void onNewVeryEasy();  void onNewEasy();  void onNewMedium();  void onNewHard();  void onAbout();  void onQuit();  private:  Sudoku *sudoku;  MainFrame *mainFrame; //   <--LINE 32};MainFrame.h#pragma once#include "App.h"#include <wx/wx.h>class MainFrame : public wxFrame{  public:  MainFrame();  ~MainFrame();  private:  App *app; // Pointer to main application object <--LINE 12  wxMenuBar *menubar;  wxMenu *fileMenu;  wxMenu *newMenu;};Visual Studio 2010 gives the following errors:App.h(32): error C2143: syntax error : missing ';' before '*'App.h(32): error C4430: missing type specifier - int assumed. Note: C++ does not support default-intApp.h(32): error C4430: missing type specifier - int assumed. Note: C++ does not support default-intMainFrame.h(12): error C2143: syntax error : missing ';' before '*'MainFrame.h(12): error C4430: missing type specifier - int assumed. Note: C++ does not support default-intMainFrame.h(12): error C4430: missing type specifier - int assumed. Note: C++ does not support default-intI believe that the problem is that the two files include each other. How can I solve this problem?   
 Required reading.   ;  Generally if you are only have a pointer to an object in a class definition, you're better off forward defining it, rather than including the header.For example:App.h#pragma once// forward definitionsclass Suduko;class MainFrame;class App { /*blah blah*/ }MainFrame.h#pragma once#include <wx/wx.h>// forward definitionsclass App;class MainFrame : public wxFrame { /*blah blah*/ }You should be able to safely include both headers inside the c/cpp files that need to actually do something with the classes.;  Thanks!I've been reading this site for a while, but this was my first post. And I got an answer after only four minutes! I love this place.   