记录详情

Compile Error

/in/foo.cc: In member function 'void Time::addSeconds(int)':
/in/foo.cc:25:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   25 |         return carryHours;
      |                ^~~~~~~~~~
/in/foo.cc: In member function 'void DateTime::addSeconds(int)':
/in/foo.cc:78:40: error: void value not ignored as it ought to be
   78 |         int carryDays = time.addSeconds(sec);
      |                         ~~~~~~~~~~~~~~~^~~~~
/in/foo.cc: In member function 'void DateTime::printDateTime() const':
/in/foo.cc:86:23: error: passing 'const Date' as 'this' argument discards qualifiers [-fpermissive]
   86 |         date.printDate();
      |         ~~~~~~~~~~~~~~^~
/in/foo.cc:64:10: note:   in call to 'void Date::printDate()'
   64 |     void printDate(){
      |          ^~~~~~~~~
/in/foo.cc:88:23: error: passing 'const Time' as 'this' argument discards qualifiers [-fpermissive]
   88 |         time.printTime();
      |         ~~~~~~~~~~~~~~^~
/in/foo.cc:28:10: note:   in call to 'void Time::printTime()'
   28 |     void printTime(){
      |          ^~~~~~~~~

信息

递交者
类型
递交
题目
P1007 OO1-5 日期时间类DateTime
语言
C++
递交时间
2025-04-04 15:44:48
评测时间
2025-04-04 15:44:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes