[GLLUG] c++ help sanitizing
Clay Dowling
clay at lazarusid.com
Fri Sep 19 15:23:53 EDT 2008
Sean O'Malley wrote:
> This is probably offtopic but..
> Is there a library in c++ that will sanitize a string for use with an
> system()/exec() call to the windows command prompt so it can be passed as
> a string without being interpreted by the command shell thing. Im not
> wishing to reinvent the wheel with this.
system() is a troublesome function and will probably cause you trouble.
Try instead some things from the exec() family of functions, which
recognize discrete parameters. Or WinExec, since you look like you're
on that platform.
Clay
More information about the linux-user
mailing list