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.
...