/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int sort(int*)':
/in/foo.cc:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:28:3: warning: capture of variable 'std::cin' with non-automatic storage duration
   cin >> a[i];
   ^~~
In file included from /in/foo.cc:1:0:
/usr/include/c++/6/iostream:60:18: note: 'std::istream std::cin' declared here
   extern istream cin;  /// Linked to standard input
                  ^~~
/in/foo.cc:28:7: error: expected ',' before '>>' token
   cin >> a[i];
       ^~
/in/foo.cc:28:7: error: expected identifier before '>>' token
/in/foo.cc:28:14: error: expected ']' before ';' token
   cin >> a[i];
              ^
/in/foo.cc: In lambda function:
/in/foo.cc:28:14: error: expected '{' before ';' token
/in/foo.cc: In function 'int main()':
/in/foo.cc:25:7: warning: unused variable 'a' [-Wunused-variable]
  int* a[n];
       ^
/in/foo.cc: At global scope:
/in/foo.cc:30:6: error: expected constructor, destructor, or type conversion before '(' token
  sort(a);
      ^
/in/foo.cc:32:2: error: expected unqualified-id before 'for'
  for(int i=0;i<n;i++){
  ^~~
/in/foo.cc:32:14: error: 'i' does not name a type
  for(int i=0;i<n;i++){
              ^
/in/foo.cc:32:18: error: 'i' does not name a type
  for(int i=0;i<n;i++){
                  ^
/in/foo.cc:35:2: error: 'cout' does not name a type
  cout >> min;
  ^~~~
/in/foo.cc:36:1: error: expected declaration before '}' token
 }
 ^

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C++
递交时间
2018-10-18 13:06:48
评测时间
2018-10-18 23:11:33
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes