Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
System("Ping") always returns 0
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Jerry Coffin, post: 2545000"] What you're doing wrong is expecting the return value from system to mean something. Except when you pass a null pointer, the return value from system is implementation defined -- you can't (portably) depend on it meaning anything. In my own experience, it usually reflects one of two things -- it can reflect the return value from whatever you asked it to do. It can also, however, reflect only whether your invocation of the command processor itself succeeded -- i.e. whether what you specified was a valid command that could be executed to at least some degree (e.g. that it could find an executable named ping somewhere on the path -- but nothing more). I'm reasonably certain there is no portable way to do what you want. Almost every system I know of has some way to do it, but TTBOMK, it's never been standardized. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
System("Ping") always returns 0
Top