I'm using the system
command in C++ to call some external program, and whenever I use it, a console window opens and closes after the command finishes.
How can I avoid the opening of a console window? I would be happy if the solution could be platform-independent. I would also like for my program to wait until the command is finished.