Click here to Skip to main content
13,000,324 members (77,554 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Its been a long time i wrote my codes in C++ and i've forgotten many things. Pls can some1 help me with how i can read a single string containing white spaces from standard input, without having to form a loop for this; something like a name (''James Berk Brown''). Pls any respond would be appreciated. 10x
Posted 20-Sep-12 22:05pm
Mohibur Rashid 21-Sep-12 4:35am
did you check google?
Emejulu JVT 21-Sep-12 4:46am
yes i did but i didn't see stuffs that matched the specific
Andrewpeter 21-Sep-12 4:59am
You search with words "how to use scanf in C++". Good luck!

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

'getline' is the function you are looking for.[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 21 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100