So im trying to read an .xls file using ifstream and the executable return an uninteligible string.
My function is as follows
void submenuP(){
ifstream ifile;
ifile.open("C:\\Users\\VDSCH\\Desktop\\Productos\\Peluches\\Modelos.xls", ios::in);
ifile.exceptions(ifstream::badbit | ifstream::failbit);
string s;
int c;
system("CLS");
if (!ifile){
cerr<<"file not found"<<endl;
exit(1);
}
cout<<"\n\n\t Lista de Peluches\n";
while(!(ifile>>ws).eof()){
ifile>>s;
if(ifile.fail()) exit(1);
cout<<s<<endl;
}
ifile.close();
}
the function is supposed to only display the contents of the file but it returns this :
Lista de Peluches
╨╧αí▒
Is there something wrong with my function or perhaps is the compiler , im using g++ in mingw for windows and have recently updated the libraries
Thanks in advance