title: Trying to pass user input into string (C++)
body: <p>I am currently working on string and working on this simple example. I am trying to pass the <em>"birthdate"</em> user input into my <em>logSuccess</em> string when it is ptinted. Done a lot of googling but haven't found solution yet. Any tips?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;stdlib.h&gt;
  
  using namespace std;
  
  std::string birthdate;
  
  void printString(const std::string&amp; string)
  {
     std::cout &lt;&lt; string &lt;&lt; std::endl;
  }
  
  void getBirthdate()
  {
     std::cout&lt;&lt;"When is your birthday? "&lt;&lt;std::endl;
     cin&gt;&gt;birthdate;
  }
  
  int main()
  {
  std::string name = std::string("Dame") + " hello!";
  std::string logSuccess = std::string("Thank you! We will send you a postcard on ") + birthdate;
  
  
  printString(name);
  getBirthdate();
  printString(logSuccess);
  
  
  std::cin.get();
  }
  </code></pre>