Re: .getline operator

[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]

Posted by William D McQuain on November 09, 2001 at 18:27:24:

In Reply to: .getline operator posted by Q on November 09, 2001 at 16:19:25:

: Say we use "dataFile.getline(...)" to read in each line of data and store it in the proper array. I seem to read a discrepancy between Visual's popup dialog when I start typing the getline( part and the past examples of getline use in the course notes. Would someone tell me exactly how we are to implement the geline operator to read in all data to a specific stop character?

Well, you don't "implement" getline(), you call getline().

There are several different versions; the course notes cover the versions that are technically not class member functions. Those are called as:

getline(inputstream, stringforresults, stopchar);

The versions that are called using the dot operator, say cin.getline(...), should NOT be used in this project.

: Thanks!

Follow Ups:

Post a Followup




Optional Link URL:
Link Title:
Optional Image URL:

[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]