I'm definitely in a desperate case... Using C++, I have defined those two classes:
// Console.hpp
#ifndef CLASS_Console
#define CLASS_Console
#include <iostream>
#include "Window.hpp"
class Console
{
public:
Window *Win;
Console(Windows *Win); // Which then does "this->Win = Win;"
void AppendText(std::string);
// And some more dozens functions
};
#endif
// Window.hpp
#ifndef CLASS_Window
#define CLASS_Window
#include <iostream>
#include "Size.hpp"
class Window
{
private:
Console *m_Console;
public:
Window(); // Which then does "m_Console = new Console(this); m_Console->AppendText("YEAH");"
Console *getConsole(); // For use by another classes
Size getSize();
// And some more Tens and Tens of functions
};
#endif
At first, one will say: "Use forward declaration!"
But given I need to access a number of those dozens of functions (In one way and in the another), is there any way I can avoid using forward declaration?
Thanks for your (future) answers!