Original Post
Ive been looking for a way to do some file input in c++. If i google it, i end up with about a million different ways to do it, but none of them are what i want. Most of them use c-style strings ( char* ), and most of them read one character from the file at a time using getch() or something.
I want a method that uses std::string instead of an array of characters,and i want to be able to read a whole line at a time. Ive been looking at fstream , and within that, ifstream. It provides a getline() function that reads a whole line, but it stores it in a c-style string, not an std::string.
can someone post the 3 or 4 lines of code needed to acheive what im trying to do? Im sure it exists but i just cant find an example.
tanks!
[edited by - AndreTheGiant on August 9, 2003 5:30:10 PM]
[edited by - AndreTheGiant on August 9, 2003 5:30:37 PM]