QByteArray myArray("Hello, world!"); char* endPointer = myArray.end();
QByteArray myArray; myArray.resize(10); char* endPointer = myArray.end();In this example, a QByteArray is first created with no data. The resize() function is then called to allocate space for 10 bytes in the byte array. Finally, the end() function is called to get a pointer to the end of the byte array. Package Library: Qt