In c, I can use newline delimeter ([^
]) with scanf. Using which I can store the line. Similarly for cin, I can use getline.
If I have to store a paragraph, I can simulate the functionality using my own special char delimiter like [^#] or [^] with scanf function in c.
char a[30];
scanf("%[^#]",a);
printf("%s",a);
How to achieve the similar functionality with cin object in cpp.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…