Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

what do i use instead of gets() as it is not accepting it

0 votes
asked Feb 7, 2018 by anonymous

2 Answers

0 votes
answered Feb 8, 2018 by Laxaman Pal (440 points)

If gets() is not working, you can also use getline() function.

Its prototype is : cin.getline(array_or_string_name, no_of_characters_to_read);

Its included in iostream header file...

Cheers yes

0 votes
answered Feb 8, 2018 by anonymous
use scanf() function for input string....
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...