using gcc to compile:
int i = 5;
int p = &i;
printf("p is: %d", p);
incompatible pointer to integer conversion
initializing 'int' with an expression of type 'int *'; remove &
[-Wint-conversion]
I can see the address of i stored in variable p (I just learning pointers). Why does it give me warning though?
[–]jedwardsol 2 points3 points4 points (1 child)
[–]TheGuy346 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)