I'm trying to do 3 things:
1. Open a pipe to "mysql -fs" and write to it using << operators:
I can't figure out how to use popen() and stuff to get an ostream out of that process.
i.e.
FILE *mysql;
mysql = popen("mysql -fs", "w"
;
/* Where to go now? */
2. Open a file "carma.log" to write to using <<. How do I do this?
FILE *logfile
logfile = fopen("carma.log", "w"
;
/* Now what?*/
3. Re-direct stdout (I've got this down...)
any suggestions?
Thanks
MWB.
Disclaimer:
Beware: Studies have shown that research causes cancer in lab rats.
1. Open a pipe to "mysql -fs" and write to it using << operators:
I can't figure out how to use popen() and stuff to get an ostream out of that process.
i.e.
FILE *mysql;
mysql = popen("mysql -fs", "w"
/* Where to go now? */
2. Open a file "carma.log" to write to using <<. How do I do this?
FILE *logfile
logfile = fopen("carma.log", "w"
/* Now what?*/
3. Re-direct stdout (I've got this down...)
any suggestions?
Thanks
MWB.
Disclaimer:
Beware: Studies have shown that research causes cancer in lab rats.