Is this what you are trying to accomplish?Code:#include <iostream.h>
int x;
void input();
int main()
{
input();
cout << x;
return 0;
}
void input()
{
cin >> x;
cout << x;
}
If so, it works when compiled under visual C++...
Code tags added by Kermi3
