사용자가 핸드폰과 컴퓨터를 두 번 입력합니다. 서로 다르다면 서로 동등하게 설정해야합니다. 그런 다음 컴퓨터 시간을 핸드폰 시계보다 1 시간 5 분 23 초 빠르게 늘려야합니다.값을 특정 시간 증가시키기
이것은 if 문입니다.
if (!myComputerClock.equalTime(cellPhoneClock))
{
myComputerClock=cellPhoneClock;
cout << " The new time is: \n";
cout << " Cellphone: ";
cellPhoneClock.printTime();
cout << endl << endl;
cout << " Computer: ";
myComputerClock.printTime();
}
else
{
myComputerClock.incrementHours();
myComputerClock.incrementMinutes();
myComputerClock.incrementSeconds();
}
'myComputerClock.setTime (chrs, cmins, csecs) = ...'이상한 것 같습니다 ... – John3136
'setTime '의 반환 시간은 어떻게됩니까? 나는 추측하고있다 - '무효'!? – StoryTeller
질문을 편집하여 다른 질문으로 변경하는 대신 새로운 질문을 게시하십시오. SO가 어떻게 작동하는지 (나중에 사용자에게 도움을 제공하는 데 도움이 됨). – Jeff