/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:7:10: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
     for (auto &x: heights)
          ^
foo.cpp:7:16: error: ISO C++ forbids declaration of 'x' with no type [-fpermissive]
     for (auto &x: heights)
                ^
foo.cpp:7:19: error: range-based 'for' loops are not allowed in C++98 mode
     for (auto &x: heights)
                   ^
foo.cpp:10:10: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
     for (auto x: heights)
          ^
foo.cpp:10:15: error: 'x' does not name a type
     for (auto x: heights)
               ^
foo.cpp:13:5: error: expected ';' before 'cout'
     cout << answer << endl;
     ^
foo.cpp:14:1: error: expected primary-expression before '}' token
 }
 ^
foo.cpp:14:1: error: expected ')' before '}' token
foo.cpp:14:1: error: expected primary-expression before '}' token
foo.cpp:14:1: error: expected ';' before '}' token

信息

递交者
类型
递交
题目
P1102 陶陶摘苹果
语言
C++
递交时间
2016-07-12 09:15:07
评测时间
2016-07-12 09:15:07
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes