Solved

make a shell

Posted on 1998-09-21
1
368 Views
Last Modified: 2010-08-05
Hi there,
I am writing a C++ program in Linux doing some enigineering stuff.  I want to make a shell in the program such that it can plot the graph by gnuplot automatically (or transform to eps format and display in ghostview) without exiting the program.

spawnl available in TC++ etc cannot be used in Linux, what can I use instead.  BTW, I dont want to quit the program striaght ahead. So execl is not a option...
0
Comment
Question by:oldjst
1 Comment
 
LVL 2

Accepted Solution

by:
JYoungman earned 30 total points
ID: 1638104
You can use popen("gnuplot", "w").   [man popen]

Write to it, "set output your-temp-file" and "set terminal postscript" to start with.  

When you're done, send the temporary file to the print spooler.

0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question