Safe alternative to system in c++

I have seen many things that say why you shouldn't use system() in c++. But what I couldn't find was a good alternative to system(). I need to use the console, but I don't know a good way to do it.
It depends on what you are trying to do.

What are you trying to do?
I'm using it to get the output of a vbs file by using the command cscript //NOLOGO script.js > output.out
Last edited on
That's an appropriate use for system(). Go ahead and use it.
Topic archived. No new replies allowed.