title: User Input Using a String to Display on Screen
body: <p>I'm writing a basic program to prompt user to enter text, then display user input on screen. I'm using a string to accept user input, but don't know what code to add in string UserInput function? So far my program prompts the user to enter text but it doesn't display on screen. What can I do to make program work?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>//Simple loop
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  string UserInput(string);
  
  int main(void)
  {
   
   string input;
  
      // Enter user input
   cout &lt;&lt; "Enter your input: ";
   cin &gt;&gt; input;
  
   // Display user input
      cout &lt;&lt; "You entered: " &lt;&lt; UserInput(input) &lt;&lt; endl;
      return 0;
   /*while (number &lt;= 5)
   {
    cout &lt;&lt; "Enter your input: ";
    number++;
   }*/
  }
  
  string UserInput(string)
  {
   //string Input = 
   return 0;
  }</code></pre>
  </div>
  </div>
  </p>