struct { // структура для рализации ShortString sQuestion[MAX_COUNT_OF_ELEMENTS]; // сохранения вопросов ShortString sFirstVariant[MAX_COUNT_OF_ELEMENTS]; ShortString sSecondVariant[MAX_COUNT_OF_ELEMENTS]; ShortString sThirdVariant[MAX_COUNT_OF_ELEMENTS]; ShortString sCorrectVariant[MAX_COUNT_OF_ELEMENTS]; ShortString sTheme; ShortString sObject;}Question;
FILE *Path = fopen("C:\file.abc","w");fwrite(&Question,sizeof(Question),1,Path);fclose(Path);
QDataStream & operator << ( QDataStream & out, const Question & q ){ out << q.sQuestion; out << q.sFirstVariant << q.sSecondVariant << q.sThirdVariant << q.sCorrectVariant; out << q.sTheme << q.sObject; return out;}
QFile file("myfile");file.open(QFile::WriteOnly);DataStrream out(&file);out << theQuestion;