C++ (Qt)#include <QCoreApplication>#include <QDataStream>#include <QFile> int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); QFile file("D:\\tmp\\bin"); file.open(QFile::WriteOnly); QDataStream out(&file); out.setByteOrder(QDataStream::LittleEndian); out << QString("text"); out << 1 << 2 << 3; return 0;}