I want to create a program in C/C++ which calls other program(which is compiled to binary already) and use its “exit status” (or return value which is int type) for some other operation.
Both programs are written in C/C++, and are to be build in separate binary executables.
I want a simple code for both of them.
Please also tell the include files to be used for linux/windows for the above program. Thanks
I want to create a program in C/C++ which calls other program(which is compiled
Share
Say you have app1 and app2.
then use the C++ system() function and assign its return value to an integer.
eg:
code for app1:
exit_status will take the value that is returned from app2’s main() function.