i got the folowing code:
then i get the errors:Code:unsigned int val1; void* ptr1 = (void*)val1; void* ptr2; ptr1 += ptr2;
1. pointers ARE integers.'+=' : illegal, right operand has type 'void *'
'+=' : pointer on left; needs integral value on right
2. ptr + ptr works why doesnt ptr += ptr?
is the compiler confused because of the int to ptr? (wich i had to type cast, even though pointers are integral)




Reply With Quote