I am trying to allow the user to input the name of a .txt file so I can add the integers from it into an array. //file reading ----------------- ifstream infile; string filename; cout << "Enter File name (no spaces): "; cin >> filename; infile.open(filename); //<---------WHERE THE ERROR SHOWS int count = 0; while (!infile.eof()) { infile >> inputA[count]; count++; } infile.close(); //------------------------------ It always throws this error :[Error] no matching function for call to 'std::basic_...
I am trying to allow the user to input the name of a .txt file so I can add the integers from it into an array. //file reading ----------------- ifstream infile; string filename; cout << "Enter File name (no spaces): "; cin >> filename; infile.open(filename); <---------WHERE THE ERROR SHOWS int count = 0; while (!infile.eof()) { infile >> inputA[count]; count++; } infile.close(); //------------------------------ It always throws this error :[Error] no matching function for call to 'std::basic_if...