开发者

Don't open console output with system() [duplicate]

This question already has answers here: 开发者_如何学Python Closed 11 years ago.

Possible Duplicate:

Hide console in C system() function, Win.

Hi guys I have a little problem, I need to ping a lot of PC, so in my program i call the function system() with "ping -n 1 > tmp.txt", but I don't want that the console window is shown.

How can I do it?

P.S.: I use dev c++ :D

thx


It is fairly hard to do this cleanly.
A better approach might be to google "ping.c" and choose one of the many implementations, then rip the guts out of it and make your own ping function. This will be faster and give you more control.


I found what you might be looking for here Hide a window in C++

And also here I guess the freeconsole() method is what you are needing?


See this question :

Hide console in C system() function, Win

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜