using result of a program

Aug 2, 2013 at 1:32am
Hi every.
I have a question. I have 2 different programs. I want to use the result of the first program in the second program. Can anyone show me one example about this. thank you!
Aug 2, 2013 at 1:45am
Nobody can help you according to your such general description i think.
Aug 2, 2013 at 2:20am
I have:
1
2
3
4
5
6
7
8
9
file1.cpp
#include<iostream>
using namespace std;
int main()
{
        int x;
        cin>>x;
        return 0;
}

1
2
3
4
5
6
7
8
9
file2.cpp
#include<iostream>
using namespace std;
int main()
{
        int y;
       .....
        return 0;
}

I want y=x. What must I do?
Topic archived. No new replies allowed.