/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:7:20: error: 'scanf' was not declared in this scope
     scanf("%d",&num);
                    ^
foo.cpp:14:36: error: 'printf' was not declared in this scope
             if(arr[i]>0) printf("+");
                                    ^
foo.cpp:16:32: error: 'printf' was not declared in this scope
         if(arr[i]<0) printf("-");
                                ^
foo.cpp:17:22: error: 'abs' was not declared in this scope
         if(abs(arr[i])!=1 || i==0) printf("%d",abs(arr[i]));
                      ^
foo.cpp:17:22: note: suggested alternative:
In file included from foo.cpp:2:0:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\cmath:99:5: note:   'std::abs'
     abs(_Tp __x)
     ^
foo.cpp:17:59: error: 'printf' was not declared in this scope
         if(abs(arr[i])!=1 || i==0) printf("%d",abs(arr[i]));
                                                           ^
foo.cpp:19:23: error: 'printf' was not declared in this scope
             printf("x");
                       ^
foo.cpp:23:16: error: 'printf' was not declared in this scope
     printf("\n");
                ^

信息

递交者
类型
递交
题目
P1812 多项式输出
语言
C++
递交时间
2014-10-19 09:18:15
评测时间
2014-10-19 09:18:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes