cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
DUMB question
DUMB question
Jun 22, 2014 at 9:10pm UTC
Nezar
(84)
Hi,
I need to declare a variable at one point and cin a plaintext like "hello world"
to it in another place, but i don't know the right type for this kind of string that is more than one word. any suggestions ?
Last edited on
Jun 22, 2014 at 9:25pm UTC
Jun 22, 2014 at 9:25pm UTC
wildblue
(1505)
I'd use getline (cin will just get up to the white space, or "hello") and a string variable.
Jun 22, 2014 at 9:32pm UTC
Nezar
(84)
Oh, thank God, it worked !!
thanks a lot, you saved me :)
Topic archived. No new replies allowed.