I am trying to take in inputs from the user for one of my projects.
cout<<"Enter Event Name (enter 'exit' to quit) ::";
gets(dat.evnm);
cout<<"Enter Type Of Event (eg: Dance, Music, 'exit' to quit) ::";
cin>>dat.type;
if(strcmp(dat.type,"exit")==0)
return 0;
cout<<"\n";
here the line
gets(dat.evnm);
will not execute, and the program jumps to the next input statement.
I tried replacing gets with, cin.getline but still have the same problem,
using cin solves the problem, but i need to take in a string so cin wont work.
Please help me with this, I am at an emergency, ...please help
Thanks In Advance