|
-
October 9th, 2007, 02:27 PM
#3
Re: istream::getline() and getline()
Thanks Eli, I was assuming that all states get cleared when I closed the stream.
About my first question, what I was trying to accomplish is to use in.getline() to read the source code and cout them. I forgot to mention that Strfile.cpp was the file that contained the attached source code.
This is the output from running the program, as you can see the getline() did not read through the end of the source file.
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
non member get()
Press any key to continue . . .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|