0 Members and 1 Guest are viewing this topic.
#include <iostream>#include <fstream>#include <string>using namespace std;ifstream file;string Filename;void run();int main (int argc, char *argv[]){if (argc == 2){string Filename = argv[1]; }run();cin.get();return 0;}void run(){string line;file.open(Filename.c_str());if (file.is_open()){while (! file.eof() ){getline (file,line);cout << line << endl; }file.close(); }}