-11

課題でタイトルの問題に直面しています。誰か早く助けてください。

/*
    member function of studentInfo class; store the value of all data members in 
    the text file named "record.txt", on separate lines in the text file.
*/
void storeFile()
{
   cout<< "All the data members are stored in file." << endl;
   ofstream outFile;
   const char* outputFileName = "record.txt";
   outFile.open(outputFileName, ios::out);
   if(!outFile)
   {
       cout<< "\nUnable to open the file." << outputFileName << endl;
   }
   else
   {
       outFile vuID;
       outFile endl;
       outFile campusID;
       outFile endl;
       outFile studentName;
       outFile endl;
       outFile fatherName;
   }
}
4

3 に答える 3