Compile Error

foo.cc: In function 'int mian()':
foo.cc:9:12: warning: unknown conversion type character '-' in format [-Wformat=]
    9 |    scanf("%-4d",i);
      |            ^
foo.cc:9:10: warning: too many arguments for format [-Wformat-extra-args]
    9 |    scanf("%-4d",i);
      |          ^~~~~~
foo.cc:9:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    9 |    scanf("%-4d",i);
      |    ~~~~~^~~~~~~~~~
foo.cc:10:5: warning: 't' may be used uninitialized in this function [-Wmaybe-uninitialized]
   10 |    t++;
      |    ~^~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1051 满足条件的3位数
语言
C++
递交时间
2022-07-10 16:42:02
评测时间
2022-07-10 16:42:02
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes