COleDateTimeSpan::operator +, -
추가, 빼기, 및 기호에 대 한 변경 COleDateTimeSpan 값입니다.
COleDateTimeSpan operator +(
const COleDateTimeSpan& dateSpan
) const throw( );
COleDateTimeSpan operator -(
const COleDateTimeSpan& dateSpan
) const throw( );
COleDateTimeSpan operator -( ) const throw( );
설명
처음 두 연산자 추가 및 날짜/시간 범위 값을 뺄 수 있습니다.세 번째 날짜/시간 범위 값의 부호를 변경할 수 있습니다.
피연산자 중 하나가 있는 경우 null의 결과 상태 COleDateTimeSpan null 값입니다.
피연산자 중 하나가 잘못 되었습니다 다른 null이 아닌 경우 결과의 상태 COleDateTimeSpan 값 유효 하지 않습니다.
잘못, 잘못, 및 null 상태 값에 대 한 자세한 내용은 참조 하십시오의 m_status 멤버 변수.
예제
COleDateTimeSpan ts1(3, 1, 5, 12); // 3 days, 1 hour, 5 min, and 12 sec
COleDateTimeSpan ts2(100.0 / (24 * 3600.0)); // 100 seconds
COleDateTimeSpan ts3 = ts1 + ts2;
ASSERT(ts3.GetSeconds() == 52); // 6 mins, 52 secs
요구 사항
헤더: atlcomtime.h