Why I cannot write smthng like this?
为什么我不能写这样的smthng?
int i, size;
int *arr;
...
for(i = size - 1, while(arr[i] == 0) i--; i >= 0; i--) { ... }
1 个解决方案
#1
0
This is just no valid syntax in C.
这在C语言中没有有效的语法。
A Solution for what you want might be:
您想要的解决方案可能是:
int i, size;
int *arr;
...
for(i = size - 1; i >= 0; i--) {
if (arr[i] == 0)
continue;
...
}
#1
0
This is just no valid syntax in C.
这在C语言中没有有效的语法。
A Solution for what you want might be:
您想要的解决方案可能是:
int i, size;
int *arr;
...
for(i = size - 1; i >= 0; i--) {
if (arr[i] == 0)
continue;
...
}