mercredi 5 mai 2021

Converting elements in char[] to int

Is it possible to extract a 2 chars out of a array and convert it to a signed int in some easy way? Example:

char data[4095];
int extractedInt;

I want to be able to point on data[x] and read 2 bytes and place it inside the int.

Aucun commentaire:

Enregistrer un commentaire