[wellylug] Programming Question

Jonathan Harker jharker at massey.ac.nz
Mon Dec 1 10:44:25 NZDT 2003


Jonathan Harker wrote:
>   system(mycommand);

Darn!!!  :-)

That should have been

   system(mycommand.c_str());

The c_str() method of a string object returns a const char* for use with C 
functions such as the system() call.

Cheers,
Jonathan.





More information about the wellylug mailing list