This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/5799: streams reading from fifo
- From: rodrigc at gcc dot gnu dot org
- To: benko at sztaki dot hu, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 3 Mar 2002 03:37:55 -0000
- Subject: Re: libstdc++/5799: streams reading from fifo
- Reply-to: rodrigc at gcc dot gnu dot org, benko at sztaki dot hu, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: streams reading from fifo
State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Sat Mar 2 19:37:55 2002
State-Changed-Why:
Not a bug in gcc. For questions about C++, read a good
C++ book or ask C++ usage questions on the comp.lang.c++.moderated
Usenet newsgroup.
You probably want to write something like:
#include <fstream>
#include <iostream>
int
main ()
{
std::ifstream in ("/tmp/pipe");
char c;
while (in.get(c)) std::cout.put(c);
return 0;
}
See 21.3.4 Input of Characters, in Stroustrup's
book for an example.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5799