Suppress console when calling “system” in C++

前端 未结 5 1743
灰色年华
灰色年华 2020-12-17 16:57

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.

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-17 17:14

    exec() looks quite platform independant as it is POSIX. On windows, it's _exec() while it's exec() on unix: See http://msdn.microsoft.com/en-us/library/431x4c1w(VS.71).aspx

提交回复
热议问题