/ Published in: C++
Expand |
Embed | Plain Text
#include <fstream> #include <string> using namespace std; method(ifstream &iFile){ int c = 0; string line; while(!iFile.eof()) { getline (iFile, line); c++; } } int main(int argc, char**argv) { ifstream iFile; iFile.open(argv[1]); method(iFile); iFile.close(); }
You need to login to post a comment.
