CMD Commands from C++

I'm currently making a program that needs to be able to execute CMD commands to the CMD(such as ipconfig etc) for this I'm using System(), However since System() is considered evil I'm wondering are there other options available to do this(that isn't system())? And if so could someone show me in the right direction?

I've goggled around and also tried to check the windows API documentation on msdn(which I found rather confusing) but I couldn't find anything about sending CMD commands. All the Google searches just points to using System().
system() is not considered evil as such. It is it's ability to execute cmd commands that makes it platform dependent is. In your case, there is no better option, I believe, since the code is by design platform specific.
Last edited on
The evil part was more a reference to the security problems and that it's slow(from what I've read). But if there is no better option then I'll obviously continue to use it.
Topic archived. No new replies allowed.