Hello, programming / studying the language, C, I came across the following error
warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
int *ponteiro = &x;
Being the code:
#include <stdio.h>
void main(){
int x[] = {0,1, 2, 3, 4, 5, 6,7,8,9,10};
int *ponteiro = &x;
for (int i = 0; i < 11; i++){
printf("%i\n", *(ponteiro++));
}
}
How can I resolve this error?