Yeah, I figured that...seemed liked the most obvious place to ask :o
(Where can you go for answers when your question is a combination of C++
and C? )
> I think you'll need to use a Linux-specific solution for this. Since
> OS-specific HOWTOs are considered off-topic in the C/C++ language
> groups, your best bet would be to ask for help in the Linux programming
> newsgroups, e.g.,
>
> comp.os.linux.development.apps
>
> [OT Hint: man popen(3), but you didn't hear that from me... ;-)]
Man pages are not as helpful as they could be...if only they included
some examples in those things :o And the man pages are C exclusive, you
certainly wouldn't find any info on how to pipe C streams into C++
streams there ;^) I a nosy through the fstream.h header file...that works.
I found the solution btw:
ifstream f;
f.attach( fd );
of just:
ifstream f( fd );
(where fd is obtained from: int fd = fileno( popen(...) );
And yes, that is linux/unix specific.
My original code was fine, but for some reason my compiler wouldn't have
any of it.
(I'm using gcc 3.2 btw) When I compiled with an older version of gcc
everything compiled and worked fine...make sense of that. Humbug.
This is not the first time I've run into this problem...here I was
thinking "I'm using a nice new version of gcc, won't have any
compatibility problems with my code and all"...well, I'm getting more
and more convinced that the opposite is true :(
Now I'll just need to figure out the reverse (but I reckon I can find
that with google ;^)
Thank anyway :)
Marcel
---
Please remove the capital U's from my address when replying by mail :^)