Advertisement

Help please!!

Started by July 23, 2000 03:57 AM
2 comments, last by kenobey 24 years, 5 months ago
I have i errorfile.cpp that looks like this: #include "errorfile.h" ofstream wfile; void WriteErrorFile(char *filename, char *error) { ofstream wfile; wfile.open(filename); wfile << error; wfile << flush; wfile.close(); return(1); } int ReadErrorFile(char *filename) { return(1); } /////////////// and a errorfile.h that looks like this: #ifndef ErrorFile #define ErrorFile #include extern void WriteErrorFile(char *filename, char *error); extern int ReadErrorFile(char *filename); #endif ///////////////// but i can''t use it, "fatal error C1010: unexpected end of file while looking for precompiled header directive" What am I doing wrong?
why the externs infront of your function prototypes?
Advertisement
This sounds to me like you use VC6 and have enabled precompiled headers, created a new .cpp file and forgot to include "stdafx.h" to your new .cpp file. Or you disable precompiled headers in the project options.

The last truth is that there is no magic(Feist)
The last truth is that there is no magic(Feist)
The externs was test and I forgot to remove them but it works now.
Thanks!!

This topic is closed to new replies.

Advertisement