# C++ problem: waiting for user input \[renamed\]

**URL:** <https://forum.kirupa.com/t/c-problem-waiting-for-user-input-renamed/217498>\
**Category:** Uncategorized\
**Created:** [February 27, 2007, 3:13pm UTC](https://forum.kirupa.com/t/c-problem-waiting-for-user-input-renamed/217498 "2007-02-27T15:13:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wo1olf](https://avatars.discourse-cdn.com/v4/letter/w/278dde/32.png) [@wo1olf](https://forum.kirupa.com/u/wo1olf)\
**Post date:** [February 27, 2007, 3:13pm UTC](https://forum.kirupa.com/t/c-problem-waiting-for-user-input-renamed/217498/1 "2007-02-27T15:13:40Z")

</div>

here’s the code…

if(op ==a)  
cout \<\< question;  
getline(cin,answer)  
traiteInfo(answer);

i’m tryin to put the informations entered by the user in the variable answer. I use getline because i have to take the whole information (especially it is a sentence). The problem i’m havin is as soon as the question is shown, the program doesn’t wait for the user, it just continue runnin.  
anyone know how solve it
