How to scan long string as input beacuse as i scan string after the space in string not present in memory and print few word | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

How to scan long string as input beacuse as i scan string after the space in string not present in memory and print few word

C++

29th Apr 2020, 1:57 PM
Atharva Labhasetwar
4 Réponses
+ 1
Ya but there is anather inbuilt function in c++ that i do t know
29th Apr 2020, 2:10 PM
Atharva Labhasetwar
+ 1
Sorry I didn't saw. I think you are talking about java. In c++ you can use getline();
29th Apr 2020, 2:12 PM
Prabhat Ranjan
Prabhat Ranjan - avatar
0
Try using nextLine();
29th Apr 2020, 2:04 PM
Prabhat Ranjan
Prabhat Ranjan - avatar
0
As we compare string with some special char are another thing then getline will not work in some compiler
29th Apr 2020, 2:12 PM
Atharva Labhasetwar