-
Operator<<
Code:
ostream& operator <<( ostream& os, const String& wrd )
{
os << wrd.str << endl;
return os;
}
I am receiving the following err msg for my operator :
Cannot create pre-compiled header: code in header
Can anyone tell me what this means.
Thanx
Sophie
-
Turn off precompiled headers somewhere.
Learn to use the search button dammit this has been asked a 100 times.
-
If u use vc++, go to project->settings and from there c/c++ tab. there should be a precompiled header directives somewhere, click the 'Dont use precompiled header'
Fixed!
-
Turn it off??? Doesn't this error occur when you have other things than declarations in your header file (*.h), ie definitions?
Declaration:
void MyFunc(int, int);
Definition:
void MyFunc(int var1, int Var2)
{
...
}