bittersweet wrote:
> how do I pass a comment e.g. plot sin(x) to gnuplot from visual c++?
Ah, that's a command you want to pass, not a comment.
> I have tried to use fprintf but it doesn't work?
You'll have to explain the context a lot better before we can help you
with this. fprintf() is the correct command to use. The trick is how
you *opened* that stream you're printing into. It can be an ordinary
file which you later pass to gnuplot as a command line argument, or it
can be a pipe. Look up system() and _popen() in your library reference
manual(s).
|