title: How to space first_name + last_name C++
body: <p>My question is how can i use spaces between first_name and last_name after i instruct the user to input his name. 
  I am using code blocks and I'm kinda confused. 
  In Dev C++ i can do</p>
  
  <pre><code>   cout&lt;&lt;first_name&lt;&lt;" "&lt;&lt;last_name;
  </code></pre>
  
  <p>Now what I am doing is just practicing C++ using variables in a class. 
  Here is my code. </p>
  
  <pre><code>    #include&lt;iostream&gt;
      #include&lt;string&gt;
      using namespace std;
  
      class DanielClass
        {
       public:
          int setNameFunction(string first_name, string last_name)
          {
      cout&lt;&lt;"Enter your first name here: ";
      cin&gt;&gt;first_name;
      cout&lt;&lt;"Enter your last name here: ";
      cin&gt;&gt;last_name;
      name = first_name + last_name;
          }
  
          string getNameFunction()
          {
  
      return name;
          }
  
      private:
         string name;
      };
  
  
      int main()
      {
  
         DanielClass NameObject;
         NameObject.setNameFunction("", "");
         cout&lt;&lt;NameObject.getNameFunction();
  
         cout&lt;&lt;"\n\n";
         return 0;
       }
  </code></pre>