I have the following code snippet
fscanf( fSettings, "%s", szLine );
bool x = separateBool ( szLine );
gSettings.useBE = x;
szLine contains useBE=1. x is set to true and the VS2010 Pro watch sees it. However, after value is assigned to gSettings.useBE in the last line, the value of gSettings.useBE is still visible as false! I have no idea how this is happenning. VS2010 SP1 installed. Many thanks for any input.

Edit:
The separateBool is the following function:
inline
bool separateBool( const char * szStr )
{
std::vector<std::string> res = split(szStr, '=');
if ( res.size() < 2 )
; /* error */
return (str2int( res[1] ) == 1 );
};
The toy version of the “algorithm”
bool a = false;
bool b = false;
b = separateBool ( szLine );
a = b;
a = separateBool ( szLine );
does everything right.
Changing the
Struct Member AlignmentinProperties->C/C++->CodeGenerationto 4 bytes from the original 8 bytes makes the trick. But I still have no idea why…