unexpected end of file in vc++
Posted on 2003-03-09
for some reason whenever i have a project with the following i get an error...
the main .cpp file
a .h header file (doesnt matter how many)
a coresponding .cpp source file (for each header file, each header file contains the declaration of a class)
it only happens when i have the files included in the project itself, naturaly they are #included in the files themselves... but if i leave it as just that and dont keep them in the project i get no errors...
to test this out i made the following
using namespace std;
cout << "mooooo! " << moo.b << "\r";
cout << endl;
cout << "bye!" << endl;
and for some reason i get this error (that points to the end of bungo.cpp
fatal error C1010: unexpected end of file while looking for precompiled header directive
normaly that means a mismatched bracket or something somewhere, but im 100% sure i matched them all (cause this happens in all projects i create). i honestly i am at a loss here. cause it works fine if i dont include the files in the project. id like them in the project cause it lets me use the class view thing which makes keeping track of all the classes i have easier (for a big thing im working on its almost a necessity, but it wont compile and link if i got it so that the files are in the project).