Hi, all,
I have a problem of QByteArry.
When I take it to store a data, a strange binary file is outputted.
A basic code is like as following.
static const char mydata[] = { 0x74,0x68,0x65 };
out<<data;
QString fname ="test1.db";
QFile ext_file(fname);
ext_file.open(QIODevice::WriteOnly);
QDataStream out(&ext_file);
static const char mydata[] = { 0x74,0x68,0x65 };
QByteArray data = QByteArray::fromRawData(mydata,sizeof(mydata));
out<<data;
To copy to clipboard, switch view to plain text mode
However, I got a strange extra data on the head of data stream.
0000 0003 7468 65
0000 0003 7468 65
To copy to clipboard, switch view to plain text mode
Why does the output data have 0000 0003 ?
Could you please help me.
Thank you very much.
Bookmarks