C subscripted value is neither array nor pointer nor vector when assigning an array element value

后端 未结 6 765
悲&欢浪女
悲&欢浪女 2020-12-09 09:36

Sorry for asking the already answered question, I am a newbie to C and don\'t understand the solutions. Here is my function

int rotateArr(int *arr) {
    int         


        
6条回答
  •  -上瘾入骨i
    2020-12-09 10:24

    You have "int* arr" so "arr[n]" is an int, right? Then your "[M - 1 + 1]" bit is trying to use that int as an array/pointer/vector.

提交回复
热议问题