Initialize the array in the following way: CMyclass object[12] = { CMyclass(argument), CMyclass(argument), CMyclass(argument), ..., CMyclass(argument) };
P
Paul Dhertoghe
@Paul Dhertoghe
Posts
-
C++ related -
CTime::GetSecond()The problem come from the fact that you're using GetCurrentTime() in the wrong way; it is a static function that returns a CTime object filled with the current time. Therefore, the following code should work: CTime somecoolvariablename, anothercoolvariablename; somecoolvariablename = CTime::GetCurrentTime(); // do some work anothercoolvariablename = CTime::GetCurrentTime(); if(anothercoolvariablename.GetSecond() - somecoolvariablename.GetSecond() > 10) // CRASH HERE! MessageBox(yadda yadda yadda);