B
Brett
Hi,
I'm compiling an old project under the 'new' visual studio 7.1.3088.
I changed the line:
#include <iostream.h>
to
#include <iostream>
and now I get a stack of errors, some of which are:
stdexcpt.h(56) : error C2143: syntax error : missing ';' before '&'
stdexcpt.h(56) : error C2433: 'ostream' : 'inline' not permitted on data
declarations
stdexcpt.h(56) : error C2501: 'ostream' : missing storage-class or type
specifiers
stdexcpt.h(56) : error C2065: 'os' : undeclared identifier
stdexcpt.h(56) : error C2059: syntax error : 'const'
stdexcpt.h(57) : error C2143: syntax error : missing ';' before '{'
stdexcpt.h(57) : error C2447: '{' : missing function header (old-style
formal list?)
The code for those lines read as follows
inline ostream &operator<<(ostream &os, const mwException &except)
{
if (except.type()) os << except.type() << endl;
const char *file =
(except.source() ? except.source() : "No File Info.");
os << "Exception! File: " << file << ", Line: "
<< except.where() << endl;
os << " " << except.what() << endl;
// Print exception-class-specific message
if (except.post() != 0)
os << except.post() << endl;
return os;
}
I've tried to include <ostream> as well, but that didn't help.
Thanks,
Brett.
I'm compiling an old project under the 'new' visual studio 7.1.3088.
I changed the line:
#include <iostream.h>
to
#include <iostream>
and now I get a stack of errors, some of which are:
stdexcpt.h(56) : error C2143: syntax error : missing ';' before '&'
stdexcpt.h(56) : error C2433: 'ostream' : 'inline' not permitted on data
declarations
stdexcpt.h(56) : error C2501: 'ostream' : missing storage-class or type
specifiers
stdexcpt.h(56) : error C2065: 'os' : undeclared identifier
stdexcpt.h(56) : error C2059: syntax error : 'const'
stdexcpt.h(57) : error C2143: syntax error : missing ';' before '{'
stdexcpt.h(57) : error C2447: '{' : missing function header (old-style
formal list?)
The code for those lines read as follows
inline ostream &operator<<(ostream &os, const mwException &except)
{
if (except.type()) os << except.type() << endl;
const char *file =
(except.source() ? except.source() : "No File Info.");
os << "Exception! File: " << file << ", Line: "
<< except.where() << endl;
os << " " << except.what() << endl;
// Print exception-class-specific message
if (except.post() != 0)
os << except.post() << endl;
return os;
}
I've tried to include <ostream> as well, but that didn't help.
Thanks,
Brett.