PDA

View Full Version : Static casting of signed chars



ShamusVW
4th November 2009, 05:46
I want to do some casting from signed char to unsigned char using

QByteArray block;
block = tcpSocket->readAll();


unsigned char* ublock = static_cast<unsigned char*>(block.data());

but get

error: invalid static_cast from type `char*' to type `unsigned char*'

Can someone explain where I am going wrong?