Help with stdiostream.h
Kevin Stedman
kstedman9@yahoo.com
Fri Feb 20 14:37:00 GMT 2004
Is there an example someplace on how this is used. I
am getting errors trying to compile the code below on
the line that uses the stdio_filebuf.
when i compile I get these error msgs:
'lp_buf' undeclared
parse error before 'lp_pipe'
My code:
#include <iostream.h>
#include <ext/stdio_filebuf.h>
#include <unistd.h>
#include <stdio.h>
#include <fstream.h>
#include <strstream.h>
...
void TImage::PrintIt(const char *cmd) const
{
...
FILE *lp_pipe;
lp_pipe = popen(cmd, "w");
if (lp_pipe) {
...
__gnu_cxx::stdio_filebuf *lp_buf =
new __gnu_cxx::stdio_filebuf(lp_pipe);
ostream lp_out((streambuf*)lp_buf);
...
lp_out.flush();
delete lp_buf;
pclose(lp_pipe);
}
...
}
Any help will be appreciated
--- Claudio Bley <bley@CS.uni-magdeburg.de> wrote:
> On Thu, Feb 19, 2004 at 11:22:50AM -0800, Kevin
> Stedman wrote:
> > I just upgraded to RedHat v. 9.? It delivers gcc
> 3.2.2
> > with it.? When I am compiling code I get the
> message
> > "stdiostream.h:? no such file or directory".?
> Where
> > did this library go.? Is there a replacement for
> it
> > ?
> > I founf a copy in the g++-3 directory, but htis
> causes
> > even more errors.? I am trying to use the stdiobuf
> > class from this.? Is there a replacement for this?
>
> Have a look at ext/stdio_filebuf.h
>
> HTH
> --
> Claudio Bley ASCII
> ribbon campaign (")
> Debian GNU/Linux user -
> against HTML email X
> http://www.cs.uni-magdeburg.de/~bley/
> & vCards / \
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
More information about the Gcc-help
mailing list