image header file problems

Hello! I used GIMP to convert my image to header file. However, pixel data is a
static char*
type, and the function which will use it accepts only
const Uint8*
type. How to convert these data types?
Try using reinterpret_cast<>.
1
2
char* p1 = ...;
Uint8* p2 = reinterpret_cast<Uint8*>(p1);
thanks! it works.
Topic archived. No new replies allowed.