vendredi 31 mars 2017

How to convert an Int32 array pointer to an Int8_t array pointer?

Any idea. I tried this:

int *p = (int*)malloc(N*sizeof(int));
...//set the value of p
int8_t *q = reinterpret_cast<int8_t *>(p);

But it doesn't work.

Aucun commentaire:

Enregistrer un commentaire