79678111

Date: 2025-06-24 19:35:05
Score: 1
Natty:
Report link

For how to check your return code from another C program, you can use system from the standard library to call the executable, and WEXITSTATUS from sys/wait.h to get the return value from the result of system.

Basicallly, it's what is said in the latter half of user25148's answer above. Look at std::system's man pages for your system, and the man pages for wait (linux).

See this answer from another question for a better explanation and good example: https://stackoverflow.com/a/20193792/21742246

Reasons:
  • Blacklisted phrase (1): another question
  • Blacklisted phrase (1): stackoverflow
  • Whitelisted phrase (-1.5): you can use
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ray S