does the system command return the value that was returned by the main() function in the called program?
say i did this:
Code:
//PROGRAM NAME: test.exe
#include <iostream.h>
int main()
{
cout << "Enter a number: ";
int number;
cin >> number;
return number;
}
//PROGRAM NAME: main.exe
#include <iostream.h>
int main()
{
cout << system("test.exe") << endl;
return 0;
}
now, theoretically, when you run main.exe, it should ask you for your number, then output it again directly below........but does the system command return anything? and also, is it os-dependant? because i noticed on XP it would return a 1 where in 98 it would return a 0......