【发布时间】:2011-04-11 12:43:00
【问题描述】:
这是我的代码。
QByteArray buff;
QDataStream stream(&buff, QIODevice::ReadWrite);
stream.setVersion(QDataStream::Qt_4_7);
stream << 5;
stream << 6;
qDebug() << buff;
int x;
int y;
stream >> x >> y;
qDebug() << x << y;
我希望 x 为 5,y 为 6。但它显示为 0 0 这是输出
"
0 0
【问题讨论】: