I need to pass a single digit integer that the user enters from one program to another. Here is an example of what I need, I just don't know how to do it
#include<iostream>
using namespace std;
int numberToPass = 0;
int main()
{
cout << "Please enter a number" << endl;
cin >> numberToPass;
// pass the number to another program and
// execute the program
return 0;
}
#include<iostream>
using namespace std;
int numberToReceive = 0;
int main()
{
cout << "The number you passed was ";
cout << numberToReceive;
return 0;
}
I'm not sure if this can be passed directly, or with _pipe, or what... Please help!
#include<iostream>
using namespace std;
int numberToPass = 0;
int main()
{
cout << "Please enter a number" << endl;
cin >> numberToPass;
// pass the number to another program and
// execute the program
return 0;
}
#include<iostream>
using namespace std;
int numberToReceive = 0;
int main()
{
cout << "The number you passed was ";
cout << numberToReceive;
return 0;
}
I'm not sure if this can be passed directly, or with _pipe, or what... Please help!