Allora:
io intendevo che il valore, sia in int che in char, sarebbe identico.
Se lo vuoi da 0 a 255, basta che fai un char /int unsigned.
Esempio:
codice:[NON TESTATO] unsigned int ui; int i; char c; unsigned char uc; c = '®'; // Carattere 174 credo, ma è memorizzato come 128 - 174 i = int(c); // Contiene 128 - 174 ui = unsigned int(c); // Contiene 174 uc = unsigned char(c); // 174 uc = '®'; i = int(uc); // Contiene 174 ui = unsigned int(uc); // 174 c = char(uc); // Contiene 128 - 174![]()