compiles but shows blank cmd?

compiles and just shows a blank cmd?

#include <stdafx.h>

#include <iostream>

int number(int x)
{
return 2 + x;
}

int main()
{
using namespace std;
int x;
cin >> x;
cout << number(x) << endl;
return 0;
}
It runs, but the blank screen you're probably seeing is the program waiting for you to enter an integer.
Ah, i was confused at first thanks for this.
Topic archived. No new replies allowed.