I'm new to MS C++ 2008 and need little help. I read in manual that return should break current execituon of the function, but after I finish my project by accident I find that look that is not true. Look my code:
long CCPlayCtrl::SetToZeroRemainTimeCurrFile(long lCard)
// ... code
return -98; //Here should exit from function?!? Why do not exit and contunie with next code???
// next code write a message to the text file. I was shocked to find that bFind=false, return -98 is executed and function execution just contunie with next row of code. WHY ???
sLog.Format( _T( "CCPlayCtrl::SetToZeroRemainTimeCurrFile-->bFind=false !!!\n" ));
Do i need to change all situations like this in my code, or this is some specific case? In any case I should know what is going on. To be more clear, this is ActiveX project (OCX) and this is one of his public functions.