why to cin.get(x,10); cause windows closed?

I tried to put two cin.get();after those two, but the windows still shut down. why?

1
2
3
4
5
6
7
8
9
10
11
12
const int asz = 10;

char x[asz];
char y[asz];

cin.get(x,asz);//newline character left in the input queue
cin.get(y,asz);//meet the newline character then stop
               //newline character still there
cout << x << endl << y <<endl;

cin.get();cin.get();//try to read that newline character
                    //and stop the windows from closing, which failed.why? 
Topic archived. No new replies allowed.