Hi everyone!
Just wrote the code like this:
Obviously, I wanna call Method(), if it was OK (i.e. return value was 0) the bFlag will be either TRUE or FALSE, and then I want to check the bFlag obtained from the Method() call.
But actually I'm a bit nervious 'bout it: what if the compiler (MSVC 7.1) will optimize the code and checks bFlag prior to calling Method()?
What do U say to that? :-)
P.S. Yes I've already read the manual, but I'm still nervious..
Update: Thank you guys! Now I'm sure it's OK :-)
Just wrote the code like this:
BOOL bFlag = FALSE;
if(!pVar->Method(&bFlag) && bFlag)
{
// Some code here
}Obviously, I wanna call Method(), if it was OK (i.e. return value was 0) the bFlag will be either TRUE or FALSE, and then I want to check the bFlag obtained from the Method() call.
But actually I'm a bit nervious 'bout it: what if the compiler (MSVC 7.1) will optimize the code and checks bFlag prior to calling Method()?
What do U say to that? :-)
P.S. Yes I've already read the manual, but I'm still nervious..
Update: Thank you guys! Now I'm sure it's OK :-)
