title: How to read first and last name with void function
body: <p>I can easily create a void function to output something like a header, but I cannot get a program to read a user's input and then output it to them. </p>
  
  <p>ie. Have a program say "Please enter your first name" and then output "You entered: (what they put)" </p>
  
  <p>An example of what I have:</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;conio.h&gt;
  #include&lt;iomanip&gt;
  #include&lt;fstream&gt;
  
  using namespace std;
  
  void namefn()//namefn prototype
  
  int main(){
      string firstName,lastName;
      return 0;
  }
  
  void namefn(string firstName, string lastName){
      cout&lt;&lt;"please enter your first and last name "&lt;&lt;endl;
  }
  </code></pre>