本文整理汇总了C++中Tools::recieveQtext方法的典型用法代码示例。如果您正苦于以下问题:C++ Tools::recieveQtext方法的具体用法?C++ Tools::recieveQtext怎么用?C++ Tools::recieveQtext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tools
的用法示例。
在下文中一共展示了Tools::recieveQtext方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
bool main() //bool main is so true
{
bool isGenerateRand = false, isFullscreen = true, isNotMuted = true, isStuSound = true, isSpecialCase = false, isDummy = true;
string songname = "sounds/1.ogg";
string temp, truefalse, ID, password, inputID, inputPassword, name, multi;
string emptyy;
string intro = "Can you type? If not please use the Windows Speech Recogniser\nthen say \"type N\" and then say \"Enter\" before using the program.\n";
Tools tool;
TF tf;
Multiple mul;
system("color 3f");
cout << intro;
speak(intro,8500);
cin >> emptyy;
if (emptyy == "no" || emptyy == "No" || emptyy == "NO" || emptyy == "n" || emptyy == "N")
{
isSpecialCase = true;
isStuSound = false;
cout << "Microsoft's commands like: \"Type (Letter)\".\nMy Voice Commands in the Student's GUI: \n\"True\" \n\"False\" \n\"A\" \n\"B\" \n\"C\" \n\"Switch/Change\" \n\"Leave\": Leave the exam before finishing it. \n\"Quit\"\n";
speak("Press any button to continue", 1700);
system("PAUSE");
}
else isSpecialCase = false;
initializeAgain:
tool.initialize();
//tool.resetQuestions(); //use those for emergency
// tool.resetAll();
bool isDone = false, isStudent = false, isInstructor = false, isAdmin = false, isHelp = false, isExam = false, isScore = false, isShot = false, isOptions = false, qanswer;
short numStudents = tool.recieveFromInt("database/numStudents.txt");
short numInstructors = tool.recieveFromInt("database/numInstructor.txt");
short numTF = tool.recieveFromInt("database/numTF.txt");
short numMUL = tool.recieveFromInt("database/numMUL.txt");
short numGrades = tool.recieveFromInt("database/numGrades.txt");
short numExamTakers = tool.recieveFromInt("database/numExamTakers.txt");
short qgrade, qpenalty, numANS = 20, size = 0, rightAns = 0, maxTF = numTF, maxMUL = numMUL, picChanger = 0, MrBreaker = 0, specialNum = 0, color1 = 0, color2 = 0, color3 = 0; //leave size alone
short tempo = 0;
float x = 0.0, y = 0.0, newX = 0.0, newY = 0.0 ;
emptyy = "";
if (numTF < 0) numTF = 0;
if (numMUL < 0) numMUL = 0;
if (numStudents < 0) numStudents = 0;
//containers for questions and students_________________
string mulAnsTemp[3];
string tempname;
string *TFarr = new string[numTF];
string *MULarr = new string[numMUL];
string *mulAns = new string[numMUL * 3];
TF *TrueFalseArr = new TF[numTF],the_TFQuestion;
Multiple *MultipleArr = new Multiple[numMUL],the_MULQuestion;
Student tempStu;
//containers for questions and students_________________
//TF____________________________________________________
if (numTF > 1)
{
ifstream fromTF("database/TFnumbers.txt");
tool.recieveQtext("database/TF.txt", TFarr,numTF);
for (short i = 0; i < numTF; i++)
{
fromTF >> qgrade >> qpenalty >> qanswer;
if (TFarr[i] != "")
{
TrueFalseArr[tempo].newQuestionTF(TFarr[i], qgrade, qpenalty, qanswer);
++tempo;
}
}
fromTF.close();
}