Whats wrong with this code?
Code:
string c,e;
float d,j,k,l,n;
int m;
char a[18];
cout<<"Type the archive that you want to open:\n";
cin.getline(a,18);
cin.ignore();
ifstream a_file ( a );
getline(a_file,c);
getline(a_file,d);
getline(a_file,e);
getline(a_file,j);
getline(a_file,k);
getline(a_file,l);
getline(a_file,m);
getline(a_file,n);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ\n";
cout<<""<< c <<"\n";
cout<<""<< d <<"\n";
cout<<""<< e <<"\n";
cout<<""<< j <<"\n";
cout<<""<< k <<"\n";
cout<<""<< l <<"\n";
cout<<""<< m <<"\n";
cout<<""<< n <<"\n";
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ\n";
well, the problem is that the archive that i want to open has to many lines, so i tried to do 1 getline for each line, but its not working it dont compile :/ help plz, ty :rolleyes: