1
I’m having trouble manipulating a file. Always error on that part, specifically on that line "while(getline(alunosE, line)){", and I don’t know why.
ifstream alunosL;
string linha;
alunosE.open("alunos.txt");
if(alunosE.is_open()){
while(getline(alunosE, linha)){
cout << linha <<endl;
}
alunosE.close();
}
else {
cout<<"erro!"<<endl;
}