| Walt Mankowski on Wed, 19 Jun 2002 22:53:26 -0400 |
|
On Wed, Jun 19, 2002 at 09:32:19PM -0400, ian reinhart geiser wrote:
>
> Whoa!
> you are MIXing C and C++... Bad move
> fstream is what you really want to be using./
>
> fstream f("filename");
> string s = "";
> f >> s;
> cout << s;
>
> or if you know its text do a
> getline(f, s);
It's perfectly legal to mix C++ iostreams and C stdio calls in the
same program when accessing different files.
Walt
Attachment:
pgpafe8GEGg7f.pgp
|
|