I have the following function that was written in c++:
int CompareStrings(IN const string& str1, IN const string& str2)
{
return str1.compare(str2);
}
I want at run time to debug it, but when I try to add watch this line str1.compare(str2);, I receive “CXX0052: Error: member function not present”,
does anyone know why?
One way is to simply do above. In Debug unoptimized build you will have x to watch and inspect and in Release build it will be optimized away.
In Visual Studio 2011 you can actually do s1.compare(s2) in the debugger 🙂 and view the results