Help with pipes

S

Scott

Hi,

I'm working on an app which performs a GPG decryption using a system
call. This prints the plain text to the screen, and at the minute I
write this out to a file and then read it in, because I can't get it
working with pipes.

Can anyone tell me how to get the decrypted plain text stored into a
variable? I've tried looking at popen() but I'm not clear on how to
implement it.

TIA

Scott
 
R

Rolf Magnus

Scott said:
Hi,

I'm working on an app which performs a GPG decryption using a system
call.

By "system call", I assume you mean a call to the system() function.
This prints the plain text to the screen, and at the minute I
write this out to a file and then read it in, because I can't get it
working with pipes.

Can anyone tell me how to get the decrypted plain text stored into a
variable? I've tried looking at popen() but I'm not clear on how to
implement it.

Not possible in standard C++. You need system specific functions. Since you
mention popen, I assume you are on a UN*X/POSIX-like system, in which case
comp.unix.programmer would be a good newsgroup for this question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help with Loop 0
Help with my responsive home page 2
Help with code 2
help needed with subprocess, pipes and parameters 0
Help with code 0
Help with if and variables 1
pipes 0
Flushing and multiple pipes 2

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top