[cs23021-2] Lab 7 - #2

Mikhail Nesterenko mikhail at cs.kent.edu
Sun Oct 18 18:57:41 EDT 2009


> 
> In the second half of Lab 7 are we to assume that the getline function does
> not work with ifstream types as well?
> 
> I mean to ask, for this Lab would it be incorrect to use a line of code such
> as; 
> 
>  
> 
> InputFile.getline(var,var);
> 

I suggest avoiding getline altogether. The extraction operator for
file input stream works exactly the same as for the console input
stream. So your code for the first part of the project should be
applicable to the second part if you replace the names of the
streams.

Thanks,
--
Mikhail


More information about the cs23021-2 mailing list