私は動的配列を扱っていますが、これは宣言です:
int *vetor = (int *) malloc (tam*sizeof(int));
vetorAleatorio (vetor, tam); //chamando função abaixo
しかし、この関数にパラメーターとして渡そうとすると:
void vetorAleatorio(int **vet, int size) {
int i;
for (i=0; i<size; i++)
vet[i] = rand() %1000;}
次のエラーがあります。
[Warning] assignment makes pointer from integer without a cast
[Warning] passing arg 1 of `vetorAleatorio' from incompatible pointer type
誰かがこれがどのように起こっているか知っていますか?