Salve a tutti, ho questo problema.

Dunque ho un std::string cosi' definita:

string str = "PIPPO"

e vorrei ricavare un array di caratteri esadecimali ognuno dei quali contiene un carattere della stringa ovver:

unsigned char strHex[5]

dove:

strHex[0] = 0x50 // P
strHex[1] = 0x49 // I
strHex[2] = 0x50 // P
strHex[3] = 0x50 // P
strHex[4] = 0x49 // O

Come devo procedere?

Ciao e grazie
Sandro