To get a better grasp of pointers for this problem set, I watched a non-cs50 video on pointers, which showed the following basic code:
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int p = 10;
int *pointer = p;
printf("the addres of the pointer p is %u", &pointer);
return 0;
}
In the Youtube, this code compiled and printed out the memory address. Nonetheless, I am getting an error:
"incompatible integer to pointer conversion initializing 'int *' with an expression of type 'int'; take the address with &
[-Werror,-Wint-conversion]"
Why is this not working in my system?