#include <iostream> #include <string> #include <fstream> using namespace std; int main() { string studentFile; ifstream file("student.txt"); if (file.is_open()) { while (getline(file,studentFile)) { cout << line << '\n'; } file.close(); }
ifstream studentfile; string studentfilename; cout << "Please enter the student file name = "; cin >> studentfilename; studentfile.open(studentfilename);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)