So I've read, over multiple forums the evil in which the System() keyword is. I have no objection to it, I understand why it is hated, but what if I need it?
I want to make a compilation server:
I would send a source file over to the server, the server would compile it, then send me the executable.
The only way ( That I know of at least ) to use system calls is by using the System() keyword:
Any call to OS would not be platform independent as different platforms have different capabilities.
You can use OS API to do stuff you need. In your case you may use ShellExecute/CreateProcess in Windows or spawn/exec in Linux. If you want it to compile on any platform, wrap platform dependent parts in conditional compilation statement.