I get the error 'MyIsland does not name a type', but do not get the error 'MyList does not name a type'. Why and how can I fix this?
Edit: I think it is due to having the list class in the header file but the MyIsland class in a separate file, but is there a way to fix this without moving the MyIsland class?
Here are a part of my files:
main.cpp
#include "header.h"
class ArchipelagoExpedition
{
private:
MyIsland* darr;
int islands;
public:
ArchipelagoExpedition();
ArchipelagoExpedition(int is);
...
Island.cpp
#include "header.h"
class MyIsland
{
private:
MyList adjList;
MyList visList;
public:
...
MyListAndNode.cpp
//list methods
...
}
header.h
//list and node class
...