QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#646900#1771. 交通规划Nova_NightWind0311Compile Error//C++205.8kb2024-10-17 09:38:202024-10-17 09:38:24

详细

answer.code: In instantiation of ‘IO& IO::operator<<(V) [with V = const char*]’:
answer.code:139:15:   required from here
answer.code:33:15: error: ordered comparison of pointer with integer zero (‘const char*’ and ‘int’)
   33 |         if (v < 0) putchar('-'), v = -v;
      |             ~~^~~
answer.code:33:39: error: wrong type argument to unary minus
   33 |         if (v < 0) putchar('-'), v = -v;
      |                                       ^
answer.code:35:21: error: invalid operands of types ‘const char*’ and ‘int’ to binary ‘operator/’
   35 |         for (; v; v /= 10)
      |                   ~~^~~~~
answer.code:35:21: note:   in evaluation of ‘operator/=(const char*, int)’
answer.code:36:24: error: invalid operands of types ‘const char*’ and ‘int’ to binary ‘operator%’
   36 |             *++top = v % 10 + '0';
      |                      ~~^~~~