reading until EOF
reading until EOF
how can i read until EOF using cin, or any other way different than while( scanf("%s", cadena)!= EOF ). The objective is to use the string of the class string and read with iostream.
- ymondelo20
- Posts: 1968
- Joined: 9 years ago
- Location: Universidad de las Ciencias Informáticas
- Gender:
- Contact:
Re: reading until EOF
while( cin>>dato )
{
//Do something ...
}
or
while( gets ( line ) )
{
//Do something ...
}
{
//Do something ...
}
or
while( gets ( line ) )
{
//Do something ...
}
"Every problem has a simple, fast and wrong solution" OJ's Main Law. 
