谁知道这俩错误是咋来的?invalid conversion from `int' to `int*'
#include<iostream>
using namespace std;
#define n 100
int row;
int createnextrow(int a[n]){
int i,j,p=1,m;
int b[m];
for(i=0;i<n;){
b[j+1]=a[i];
while(a[++i]==b[j+1]) {p++;}
b[j]=p;
j+=2;
}
cout<<"NO."<<row;
for(i=0;i<j;i++)
cout<<b[j]<<" ";
for(i=0;i<n;i++){ //将b[]复制给a[]
a[i]=b[i];
}
}
int main(){
int a[n]={1,3};
for(row=1;row<=10;row++)
createnextrow(a[n]);
system("pause");
}
------------------------------------------------------
------------------------------------------------------
24 invalid conversion from `int' to `int*'
24 initializing argument 1 of `int createnextrow(int*)'
谁知道这俩错误是咋来的?thinks
...全文
相关推荐
C语言命语法错误大全
28. warning C4244: 'initializing' : conversion from 'const double ' to 'int ', possible loss of data该警告是由于初始化数据时
c语言中常见的错误
Invalid pointer addition in function main**问题描述**:在`main`函数中对指针进行了无效的加法操作。
C++常见错误及解决方案
<char>>’ does not define this operator or a conversion to a type acceptable to the predefined operator
C语言错误提示无敌版本
例如,`int array[];` 是合法的,但在某些情况下需要显式指定数组大小,如 `int array[10];`。
C++错误一览表(中英文对照)
例如,`a + b * c` 可能导致歧义,应改为 `(a + b) * c`。2.


