Here name, roll and cl are strings. when i use cin>> for all it dont take second input and when i use getline (cin,) for all it skip first input.
cout<<"\n\t\t\tEnter Name: ";
cout<<"\n\t\t\tEnter Roll No. ";
cout<<"\n\t\t\tEnter Class: ";
cout<<"\n\t\t\tEnter number of subjects: ";
i will be very thankful if you help me.
Last edited on
Hmmm i think ur problem can be solved by using cin.ignore. give it a try...
getline will get the entire line, whitespaces included. You just need to flush your buffer before using it. That';s why it's skipping your first input.
it ignore first input i think?
yar tu koi sahi HAL bta. chawlain marni bnd kr
Yr yehi solution ha, sachi ma. -_-