Need some noob help, so go easy.
I cant seem to figure out why my variable "count" will not increment.
Any help appreciated!
-Dave
Code:#include <cstdlib> #include <iostream> #include <fstream> #include <iomanip> using namespace std; int main() { int count; char Extract_Number[4]; char File_Name[20]; cout << "Enter File to Read : " ; cin >> File_Name; count = 1; ifstream myfile(File_Name); if (myfile.is_open()) { while ( myfile.good() ) { myfile >> Extract_Number; cout << "Etracted Number is : " << Extract_Number << endl; cout << "The count is : " << count << endl; cout << "incrmenting count " ; count++ ; }} return 0; }