Hi,
I have some questions about type check warning. I am reading the tutorial notes from Click Here
CASE 1
int int1 = 1036; /* some data to point to */
int int2 = 8;
int *int_ptr1 = &int1; /* get addresses of data */
int *int_ptr2 = &int2;
*int_ptr1 = int_ptr2;
*int_ptr1 = int2;
it said "Type check warning: int_ptr2 is not an int"and "int1 becomes 8"
CASE 2
int int1 = 1036; /* some data to point to */
int int2 = 8;
int *int_ptr1 = &int1; /* get addresses of data */
int *int_ptr2 = &int2;
int_ptr1 = *int_ptr2;
int_ptr1 = int_ptr2;
it said "Type check warning: *int_ptr2 is not an int *" and "Changes int_ptr1 – doesn’t change int1"
Can anyone explain?