This works for me (note that this wouldn't work under Windows though):
#include
#include
using namespace std;
int main(int argc, char *argv[])
{
int n;
cout<<"Before performing cin operation"<>n) : false;
if(b==1)
cout<<"input is integer for n and it's correct"<