记录详情

Compile Error

/in/foo.cc:9:3: error: expected ':' before 'int'
   int Search()
   ^~~
/in/foo.cc:9:14: error: expected ';' at end of member declaration
   int Search()
              ^
/in/foo.cc: In function 'int Search(int)':
/in/foo.cc:14:18: error: 'n' was not declared in this scope
  for(int  i=0; i<n; i++)
                  ^
/in/foo.cc:15:6: error: 'data' was not declared in this scope
   if(data[i]==x)
      ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:22:10: error: 'n' was not declared in this scope
     cin>>n>>x;
          ^
/in/foo.cc:22:13: error: 'x' was not declared in this scope
     cin>>n>>x;
             ^
/in/foo.cc:23:15: error: too few arguments to function 'int Search(int)'
  cout<<Search()<<endl;
               ^
/in/foo.cc:12:5: note: declared here
 int Search(int x)
     ^~~~~~

信息

递交者
类型
自测
题目
A7-4 数组的查找函数
语言
C++
递交时间
2019-03-02 08:35:57
评测时间
2019-03-02 08:35:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes