title: C++ Can't subtract two strings
body: <p>I want to subtract two strings in this code, but it won't let me do it and gives an operator - error. This code basically tries to separate a full input name into two outputs: first and last names. Please Help! Thank you!</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  #include &lt;string&gt;
  using namespace std;
  
  string employeeName, firstName, lastName;
  int pos1, difference;
  
  int main() {
      cout &lt;&lt; "Enter your full name: " &lt;&lt; endl;
      getline(cin, employeeName);
  
      pos1 = employeeName.find(" ");
      difference = pos1 - 0;
      lastName = employeeName.erase(0,difference);
      firstName = employeeName - lastName;
  
      cout &lt;&lt; lastName &lt;&lt; firstName &lt;&lt; endl;
  
      system("pause");
      return 0;
  }
  </code></pre>