I have a small issue with my C++ code.
class Command {
public:
virtual void start(CommandDesc userinput, Converter* convertobj) = 0;
virtual void help(int option) = 0;
};
struct CommandDesc
{
std::string name;
std::string description;
Command* comobj; //Issue is here
};
If I define the structure before the class, I won't be able to define a member
Command* comobj;
If I define after the class, I wont be able to pass instance of struct to method with
virtual void start(CommandDesc userinput, Converter* convertobj) = 0;
What can you suggest? Is there any way to first declare the structure, than define it separately?