Data Casting

Marcos Araujo Sobrinho <[email protected]> 25 Feb 2003 13:27:53 -0300
Newsgroups gmane.comp.gcc.cgicc.general
Message-ID <1046190515.6467.28.camel@equake>
Hi,

First, sorry about my poor english.


I'm newbie in cgicc and i'm having some troubles with it.

I need to receive a value from a form, and then, call a system() with
it.

ofstream print_tmp("/tmp/print_web.tmp");
(*prg_arquivo).writeToStream(print_tmp);
char prog[500];
sprintf(prog, "lpr -P%s /tmp/print_web.tmp",prg_prn_sel->getValue());
system(prog);

but when I try to compile, i'm getting this:

webprint.cpp: In function `int main(int, char **)':
webprint.cpp:60: warning: cannot pass objects of type `string' through
`...'

and when I run the program i'm getting this:

lpr -Pxô˜ë˜ô8úØúP /tmp/print_web.tmp 


What I can do to fix this?

Thanks for help, and again, sorry about my very bad english
Marcos