When trying to debug a program in VS2005, all function/method calls in the immediate window result in the following error:
CXX0052: Member function not present
The solution I build consists of 5 separate projects with dependencies established from the "start-up" project out to the others. I am running a debug build with all optimizations disabled and with debug symbols loaded (or at least so says the project properties). One other thing to note is that this is an MFC project, though I'm trying to maximize my use of compliant-C++ (i.e. standard library) wherever possible instead of using microsoft's "replacement" classes (e.g. CFile).
Other solutions I've seen have been on the order of __declspec(noinline), but that won't work here, since my issue is being able to debug my use of the C++ standard library.
Here's an example:
//sample code
ifstream myFile;
myFile.open("myfile.dat", ios_base::in | ios_base::binary);
if (!myFile.is_open())
{
; //yes, this is an empty statement...there's a breakpoint here
}
When the program breaks, I want to do things like this in the immediate window:
//here's how I would expect the immediate window to look:
myFile.is_open() //call
false //result
myFile.fail() //call
true //result
myFile.clear(ios_base::goodbit) //call
//no return value
Any ideas?
ASKER
#include
using std::ifstream;
using std::ios_base;
#include
using std::setw;