C++ (Qt)QDataStream stream(&file);stream.setByteOrder(QDataStream::LittleEndian); int count;stream >> count;char buf[11];stream.readRawData( buf, sizeof(buf) );char buf2[201];stream.readRawData( buf2, sizeof(buf2) ); QTextCodec* codec = QTextCodec::codecForName("windows-1251");file.close(); QMessageBox::about(this, "title", codec->toUnicode( QByteArray( buf + 1, buf[ 0 ] ) ) + ", " + codec->toUnicode( QByteArray( buf2 + 1, buf2[ 0 ] ) ) );
C++ (Qt)char buf[12];stream.readRawData(buf, 11);Q_ASSERT(buf[0] < 11);buf[buf[0]] = 0; char buf2[202];stream.readRawData(buf2, 201);Q_ASSERT(buf2[0] < 201);buf2[buf2[0]] = 0;
C++ (Qt)bool readData( QVector<int> &data ); // или QVector<int> readData( bool &result );