473,382 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

open a pipe /c++ fstream as return?

Hi,

Until now I used the " FILE* popen(const char *, const char*)" to open one pipe
and I got one "c style" file descriptor back.

What I need is a similar system call to open a pipe, but instead of getting a
file descriptor I need a "C++ -style" fstream (class fstream).

Can anybody help me?
best regards
Laszlo
--
Laszlo Barabas
Center for High Performance Computing TU Dresden
e-mail: ba*****@zhr.tu-dresden.de
phone : (0351) (463) 38553
Jul 19 '05 #1
2 14403
Laszlo Barabas wrote:
Hi,

Until now I used the " FILE* popen(const char *, const char*)" to open one pipe
and I got one "c style" file descriptor back.

What I need is a similar system call to open a pipe, but instead of getting a
file descriptor I need a "C++ -style" fstream (class fstream).

Can anybody help me?
best regards
Laszlo

Since popen is not in the _standard_ C++ language,
have you tried asking the experts in a newsgroup
devoted to your platform or operating system?

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 19 '05 #2

"Laszlo Barabas" <ba*****@zhr.tu-dresden.de> wrote in message news:kz************@ralf.inf.tu-dresden.de...
Hi,

Until now I used the " FILE* popen(const char *, const char*)" to open one pipe
and I got one "c style" file descriptor back.

What I need is a similar system call to open a pipe, but instead of getting a
file descriptor I need a "C++ -style" fstream (class fstream).

Can anybody help me?
best regards
Laszlo
--
Laszlo Barabas
Center for High Performance Computing TU Dresden
e-mail: ba*****@zhr.tu-dresden.de
phone : (0351) (463) 38553


Look at C++-wrapper around the popen() system call :
http://alexvn.freeservers.com/s1/popen.html
http://www.simtel.net/product.php?id=61570

--
=====================================
Alex Vinokur
mailto:al****@connect.to
http://mathforum.org/library/view/10978.html
=====================================
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael Shestero | last post by:
Hello. General description of my knotty problem: I have a code (a function f) on standart C++ that perform some smart action. This code works as console application getting user input from...
5
by: Alexandros Frantzis | last post by:
Hello! Is there a standard way to find the reason a file stream open failed (eg file doesn't exist, access rights)? Thanks.
3
by: Mike Austin | last post by:
It's the most annoying thing, and causes hours of frustration. Why can't it be resolved? Regards, Mike Austin Example: #include <iostream> #include <string>
5
by: derek | last post by:
I see this has come up over and over again in the past... that programmers waste hours of confusion when using a fstream object to open, read/write, close then attempt to open another file (or the...
2
by: Steve R. Hastings | last post by:
While studying iterators and generator expressions, I started wishing I had some tools for processing the values. I wanted to be able to chain together a set of functions, sort of like the...
5
by: ehui928 | last post by:
The following program is used to open a file in mode both read and append, but it has a problem that the file can't be opened. #include <iostream> #include <fstream> #include <cstdlib> ...
14
by: Rochester | last post by:
Hi, I just found out that the general open file mechanism doesn't work for named pipes (fifo). Say I wrote something like this and it simply hangs python: #!/usr/bin/python import os
9
by: Robin | last post by:
// Pls note that test.txt exists. #include <iostream> #include <fstream> #include <string> using namespace std; int main() { fstream fs("test.txt", ios_base::in | ios_base::app);
6
by: sebastian.noack | last post by:
Hi, is there a way to or at least a reason why I can not use tarfile to create a gzip or bunzip2 compressed archive in the memory? You might might wanna answer "use StringIO" but this isn't...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.