Viết trên IDE thì chạy được nhưng trên web test case lại in ra số dòng trong tệp làm output sai .sửa ntn ạ
#include<iostream
#include<fstream
using namespace std;
void nhaptep(const char* path)
ifstream File(path);
if(!File){
cout<<"Error!";
}
while(!File.eof()){
string line;
getline(File,line);
if(File){
cout<<line<<endl;
}
}
File.close();
}