Answer the question
In order to leave comments, you need to log in
How to shift a pointer by a few bytes?
malloc'om allocated memory, but I want to shift the pointer by 1 byte. How to do it?
Answer the question
In order to leave comments, you need to log in
int* a = malloc(len);
// ...
a = (int*)((char*)a + 1);
malloc'om allocated memory, but I want to shift the pointer by 1 byte. How to do it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question