/ Vijos /

记录详情

Compile Error

foo.cpp:2:5: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
 int main{
     ^
foo.cpp:3:5: error: expected primary-expression before 'int'
     int l,m,i,j,t=0,x=0,k,l;
     ^
foo.cpp:3:5: error: expected '}' before 'int'
foo.cpp:3:5: error: expected ',' or ';' before 'int'
foo.cpp:4:5: error: 'cin' does not name a type
     cin>>l>>m;
     ^
foo.cpp:5:5: error: 'k' does not name a type
     k=m;
     ^
foo.cpp:6:5: error: 'l' does not name a type
     l+=1;
     ^
foo.cpp:7:11: error: 'm' was not declared in this scope
     int d[m][2];
           ^
foo.cpp:8:5: error: expected unqualified-id before 'for'
     for(i=0;i<m;i++){
     ^
foo.cpp:8:13: error: 'i' does not name a type
     for(i=0;i<m;i++){
             ^
foo.cpp:8:17: error: 'i' does not name a type
     for(i=0;i<m;i++){
                 ^
foo.cpp:11:1: error: 'x' does not name a type
 x=d[0][0];
 ^
foo.cpp:12:1: error: 't' does not name a type
 t=d[0][1];
 ^
foo.cpp:13:5: error: expected unqualified-id before 'for'
     for(i=1;i<m;i++){
     ^
foo.cpp:13:13: error: 'i' does not name a type
     for(i=1;i<m;i++){
             ^
foo.cpp:13:17: error: 'i' does not name a type
     for(i=1;i<m;i++){
                 ^
foo.cpp:17:1: error: 'j' does not name a type
 j=x-t+1;
 ^
foo.cpp:18:4: error: expected unqualified-id before 'for'
    for(i=0;i<m;i++){
    ^
foo.cpp:18:12: error: 'i' does not name a type
    for(i=0;i<m;i++){
            ^
foo.cpp:18:16: error: 'i' does not name a type
    for(i=0;i<m;i++){
                ^
foo.cpp:22:1: error: 'l' does not name a type
 l-=j;
 ^
foo.cpp:23:1: error: 'cout' does not name a type
 cout<<l;       
 ^
foo.cpp:24:1: error: expected unqualified-id before 'return'
 return 0;
 ^
foo.cpp:25:1: error: expected declaration before '}' token
 }
 ^

信息

递交者
类型
递交
题目
P1103 校门外的树
语言
C++
递交时间
2014-11-04 22:20:49
评测时间
2014-11-04 22:20:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes