Index:
[thread]
[date]
[subject]
[author]
From: Philip K. Warren <pkw@duke.edu>
To :
Date: Mon, 08 Feb 1999 17:30:37 -0500
Re: getLine()????????
I believe the proper syntax for getline is:
getline(input, myLine)
If input is an ifstream and myLine is a string. So your loop would look
like:
while(getline(input, myLine))
{
// do something with myLine
}
Hope this helps.
-- Philip
Carl Robert Knerr wrote:
>
> When trying to use "while(input.getLine())", we had to use the following
> syntax to get it to compile:
>
> while(input.getline(myLine.c_str(),100,'\n'))
>
> The 100 is the maximum numbers of characters allowed on that line. I
> think there has to be an easier way to do this, but I can't figure it out
> at all. Any help would be greatly appreciated.
Index:
[thread]
[date]
[subject]
[author]