Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
(Solved)How To Conversion From .... to ..... ?
Hi all how i can convert ?
QByteArray to const unsigned char*
Salvatello last edited by
@const unsigned char* begin = reinterpret_cast<unsigned char*>(byteArrayBuffer.data());
const unsigned char* end = begin + byteArrayBuffer.length();
std::vector<unsigned char> bufferToCompress( begin, end );@
That was look promising.
Thank you for quick Help......Salvatello
Since it seems you won't be modifying the content of the QByteArray, it should rather be
@const unsigned char begin = reinterpret_cast<const unsigned char>(byteArrayBuffer.constData());@
Thanks..again to SGaist