123
file->open("Input.txt"); file-> close();
1234567
getline(*file, input) //input is string to store files contents while(*file) { //do comparisons getline(*file, input) }
file = new std::ifstream;
delete file;
123456789101112131415161718
void fileOpen(string fileName) { string word; file->open(fileName.c_str(), ios::in ); if(file) { getline(*file, word); while(file) { cout << word; getline(*file, word); } } else cout << "File not open"; }