记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:12:44: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   12 |                         if (i == j) printf(1);
      |                                            ^
      |                                            |
      |                                            int
In file included from /in/foo.cc:1:
/usr/include/stdio.h:356:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  356 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/in/foo.cc:13:37: warning: argument 1 null where non-null expected [-Wnonnull]
   13 |                         else printf (0);
      |                              ~~~~~~~^~~
/usr/include/stdio.h:356:12: note: in a call to function 'int printf(const char*, ...)' declared 'nonnull'
  356 | extern int printf (const char *__restrict __format, ...);
      |            ^~~~~~

信息

递交者
类型
递交
题目
P1027 输出矩阵1
语言
C++
递交时间
2026-11-29 20:58:27
评测时间
2026-11-29 20:58:27
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes