#include <iostream.h>
#include <stdio.h>
using namespace std;
struct st{
int a;
char name[50];
};
void add(void){
st *temp=new st;
cout<<"Enter Your Name:";
gets(temp->name); //skips this line
}
int main(){
int n=1;
do{
cout<<"Enter 1 for name\n";
cout<<"Enter 2 for display\n";
cout<<"enter 3 to exit";
cin>>n;
if(n==1) add();
} while(n!=3);