Reputation: 10695
In my main class I have:
#include "main.h"
outPut O;
int main(){
...
}
where the main.h file has #include "outPut.h"
the "outPut.h" line has:
#ifndef OUTPUT_H
#define OUTPUT_H
#include <iostream>
#include <fstream>
#include "properties.h"
#include "particles.h"
class outPut{
public:
outPut();
std::ofstream file;
void show(lipid * l);
};
#endif
and the outPut.cpp:
#include "outPut.h"
outPut::outPut(){
}
When I compile this I get the error:
main.cpp:3: error: ‘outPut’ does not name a type
Why so?
Thanks...
Edit, found it. main.h wasn't saved and the #include "outPut.h" was canceled.
Upvotes: 0
Views: 5691
Reputation: 3142
grep for OUTPUT_H in all source files. You might have inadvertently defined the include guard in some other header which is included earlier than outPut.h.
Upvotes: 0