I have the following c++ classes:
Page.h:
#ifndef PAGE_H_
#define PAGE_H_
#include "Process.h"
class Page {
public:
Page();
virtual ~Page();
Process *process;
};
#endif /* PAGE_H_ */
and Process.h:
#ifndef PROCESS_H_
#define PROCESS_H_
#include <vector>
#include "Page.h"
class Process {
public:
Process();
virtual ~Process();
int size;
double life_remaining;
std::vector<Page> pages;
};
#endif /* PROCESS_H_ */
When I compile I get the following error:
../src/Process.h:21:14: error: ‘Page’ was not declared in this scope
../src/Process.h:21:18: error: template argument 1 is invalid
../src/Process.h:21:18: error: template argument 2 is invalid
How do I correct this? When I comment out the lines: #include "Proccess.h" and Process *process; then it compiles. When I remove the comments it gives me the error