This is driving me insane, I have a class called Model, a class called View, and a header file for something GameCommand. I've included the right header guards and everything as far as I can tell but I keep getting an unknown type name error
Model.h
#ifndef MODEL_H
#define MODEL_H
class Model
{
public:
Model(); //default constructor
};
#endif
Model.cpp
#include "Model.h"
#include <iostream>
using namespace std;
Model::Model() //default constructor
{
whatever
}
View.h
#ifndef VIEW_H
#define VIEW_H
class View
{
public:
View();
};
#endif
View.cpp
#include "View.h"
#include <iostream>
using namespace std;
View::View()
{ whatever
}
GameCommand.h
#ifndef GAMECOMMAND_H
#define GAMECOMMAND_H
#include "Model.h"
#include "View.h"
void DoGoCommand(Model&, View&);
error: unknown type name 'Model'
void DoGoCommand(Model&, View&);
^
error: unknown type name 'View'
void DoGoCommand(Model&, View&);
^
I feel like I've tried everything, is there something I am just not seeing here?