记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:27:20: error: cannot convert ‘std::vector<int>’ to ‘int*’
   27 |         InsertSort(a,n)
      |                    ^
      |                    |
      |                    std::vector<int>
foo.cc:6:21: note:   initializing argument 1 of ‘void InsertSort(int*, int)’
    6 | void InsertSort(int a[],int n)
      |                 ~~~~^~~
foo.cc:30:9: error: expected ‘,’ or ‘;’ before ‘for’
   30 |         for(int i = 0; i < n ; i++)
      |         ^~~
foo.cc:30:24: error: ‘i’ was not declared in this scope
   30 |         for(int i = 0; i < n ; i++)
      |                        ^
foo.cc:29:13: warning: unused variable ‘m’ [-Wunused-variable]
   29 |         int m = a[n/2+1]
      |             ^

信息

递交者
类型
自测
语言
C++
递交时间
2025-04-12 16:29:52
评测时间
2025-04-12 16:29:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes