main.cpp
int main()
{
return 0;
}
cell.h
#pragma once
class _cell {};
cell.cpp
#include "cell.h"
experiment.h
#pragma once
class _experiment
{
_cell cell;
};
experiment.cpp
#include "experiment.h"
#include "cell.h"
Error:
experiment.h(5): error C2146: syntax error : missing ';' before identifier 'cell'
experiment.h(5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
experiment.h(5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
This has been driving me nuts. Any help? Thanks!
You have to
#include <cell.h>fromexperiment.has otherwise_cellis not defined when used inexperiment.h.