Problem card
User YongXin
Submission Time 2023-06-05 15:40:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

card.cpp: In function ‘void s(int&, int, int)’:
card.cpp:4:12: error: invalid types ‘int[int]’ for array subscript
4 | char t=a[k];
| ^
card.cpp:5:31: error: invalid types ‘int[int]’ for array subscript
5 | for (int i=k+1;i<m;++i) a[i-1]=a[i];
| ^
card.cpp:5:36: error: invalid types ‘int[int]’ for array subscript
5 | for (int i=k+1;i<m;++i) a[i-1]=a[i];
| ^
card.cpp:6:7: error: invalid types ‘int[int]’ for array subscript
6 | a[m-1]=t;
| ^
card.cpp: In function ‘int main()’:
card.cpp:15:20: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
15 | if (f[i]=='A') s(a,m,0);
| ^
| |
| int*
card.cpp:3:13: note: initializing argument 1 of ‘void s(int&, int, int)’
3 | void s(int& a,int m,int k){
|