Compiler Errors: C2653/C2871 ?
Can anyone tell me how to correct this compiler error? I have tried to find out something in the MSV6 documentation but to no avail.
// This line calls std::malloc...
d:\wildfire\source files\wfmemorymgt.cpp(161) : error C2653: ''std'' : is not a class or namespace name
// This line is "using namespace std;"
d:\wildfire\source files\wfmain.cpp(7) : error C2871: ''std'' : does not exist or is not a namespace
TIA for the help.
Regards,
Jumpster
Regards,JumpsterSemper Fi
Since you''re already using namespace std, why not get rid of the std before malloc?
Use malloc only, not std::malloc. That might help.
Use malloc only, not std::malloc. That might help.
-Philip
try including a header, which makes use of the std namespace (string for example).
Edited by - entrox on November 12, 2000 8:00:54 AM
Edited by - entrox on November 12, 2000 8:00:54 AM
.entrox
entrox: No dice. It didn''t work.
procalan: No can do. I am using "A class for detecting memory leaks and other memory related problems, contributed by Nicolas Capens" from the glVelocity code archive.
Is there a compiler setting that I am missing or something?
Regards,
Jumpster
procalan: No can do. I am using "A class for detecting memory leaks and other memory related problems, contributed by Nicolas Capens" from the glVelocity code archive.
Is there a compiler setting that I am missing or something?
Regards,
Jumpster
Regards,JumpsterSemper Fi
I got it.
Had to add the following to the cpp file:
namespace std {
#include "cstdlib" // Use Angle brackets instead of quotes...
}
and then change all calls to exit() to std::exit().
I found the fix on the msdn web-site under "Known Bugs" but it didn't specify what version it was known for. I have vc6 sp3 (I lost my sp4 cds).
Regards,
Jumpster
Edited by - Jumpster on November 12, 2000 10:47:09 AM
Had to add the following to the cpp file:
namespace std {
#include "cstdlib" // Use Angle brackets instead of quotes...
}
and then change all calls to exit() to std::exit().
I found the fix on the msdn web-site under "Known Bugs" but it didn't specify what version it was known for. I have vc6 sp3 (I lost my sp4 cds).
Regards,
Jumpster
Edited by - Jumpster on November 12, 2000 10:47:09 AM
Regards,JumpsterSemper Fi
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement