What is the C equivalent for reinterpret_cast?

int *foo;
float *bar;

// c++ style:
foo = reinterpret_cast< int * >(bar);

// c style:
foo = (int *)(bar);

Leave a Comment