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]
| ^