Re: [Dev-C++] newbie string parsing question
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel K. O. <dan...@ya...> - 2004-08-19 01:49:15
|
wor...@so... wrote:
>I have looked into the getline(string, max, delimiter) function but it needs char[]'s.
>Since I don't know the length of the string that I need can someone recommend
>an existing different class function or something?
>
>
You can use the getline() template, like this:
ifstream the_file(...);
string the_line;
...
while (getline(the_file, the_line))
do something;
Daniel K. O.
|