CTime函数的运行时错误

时间:2013-11-05 17:24:59

标签: c++ visual-studio-2010 visual-c++ runtime-error ctime

我使用以下代码得到运行时错误(Debug Assertion Error / m_time!= - 1)但无法弄清楚。任何帮助表示赞赏。

    CTime * time_var=new CTime;

CTime CurrentTime=CTime::GetCurrentTime();
int CurrentYear = time_var->GetYear();
int CurrentMonth = time_var->GetMonth();
int CurrentDay = time_var->GetDay();

    if( CurrentTime >= CTime(CurrentYear,CurrentMonth,CurrentDay,12,10,00) )
    {
                 //do sth.
             }

0 个答案:

没有答案