#include #include #include #include using namespace std; int main() { // Reading one line at a time // \n = LF = line feed is automatically deleted char str[80]; int char_count; ifstream myfile("files-many.txt"); if (myfile.fail()) { cout << "Fail bit set" << endl; return 1; } char_count = 0; while (true) { myfile.getline(str,80); if (myfile.eof()) { cout << "end of file" << endl; break; } cout << "length of str is " << strlen(str) << endl; } myfile.close(); myfile.clear(); return 0; }