DUMB question

Jun 22, 2014 at 9:10pm
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
Jun 22, 2014 at 9:25pm
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
Oh, thank God, it worked !!

thanks a lot, you saved me :)
Topic archived. No new replies allowed.