struct stu_dat //outside main function
char ans='y'; //inside main function
cout<<"want to enter more data?';
No compilation problem.when executing prompt waits for inputting rollno
but, as soon as i enter a char string it keeps looping displaying the "want to enter more data?".i cant understand what is going on,as there is no compilation problem and runs good till i input the name.