|
From: Noorez K. <coo...@ho...> - 2004-06-21 04:15:33
|
I marked the error with a comment.
void Quiz::writeQuestion(Quiz ques, int type, char* quizName)
{
ofstream out_file(quizName,ios::noreplace); //compiler returns error
that ios::noreplace doesn't exist.
if(type == 1)
{
out_file << "#\n" << questionNumb << ". " << ques.question << '\n';
out_file << "A. " << ques.answerA << '\n';
out_file << "B. " << ques.answerB << '\n';
out_file << "C. " << ques.answerC << '\n';
out_file << "D. " << ques.answerD << '\n';
out_file << '#' << ques.actual << '\n';
}
if(type == 2)
{
out_file << "#\n" << questionNumb << ". " << ques.question << '\n';
out_file << "True or False\n";
out_file << '#' << ques.actual << '\n';
}
}
I marked the error with a comment.
_________________________________________________________________
MSN Premium helps eliminate e-mail viruses. Get 2 months FREE*
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
|