how to get input in structure memeber

Hi i wan to get input in structure memrber ty char array and i tried gets and cin.getline bt the complier do not stops here to get input it moves to the next line...same problem in class data member....
Last edited on
Try posting some code, so we can see what you have down, so far. (:
Probably there is a newline in the input buffer after a previous item was input.
Clear the buffer before getline()
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
or maybe
std::cin.ignore( 1000, '\n' );

Thanks Chervil..
Topic archived. No new replies allowed.