title: Unexpected problems concatenating strings
body: <p>I'm trying to concatenate strings using +, but there is some weird stuff going on. Here is my "Grade" class I have for a class project:</p>
  
  <pre><code>#pragma once
  #include &lt;fstream&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  
  class Grade {
      private:
          string className;
          string student;
          string letter;
  
      public:
          Grade(string c, string s, string l) : className(c), student(s), letter(l) {}
  
          string getLetterGrade() const { return letter; }
          string getClassName() const { return className; }
          string getStudent() const { return student; }
          void setLetterGrade(string l) { letter = l; return;}
          void setClassName(string c) { className = c; return;}
          void setStudnet(string s) { student = s; return;}
  
          string toString() const { string output = "hello"+student; return output; }
  };
  </code></pre>
  
  <p>Obviously, the toString() method isn't currently what I want it to be.
  If I run the toString() as above, I get "hello529173860" out, as expected. However, if I change the line to:</p>
  
  <pre><code>string toString() const { string output = student+"hello"; return output; }
  </code></pre>
  
  <p>then the output is "hello3860". This isn't just putting the hello string on the front, but its replacing characters from the student string in the process... somehow?</p>
  
  <p>Furthermore, if I try to use:</p>
  
  <pre><code>string toString() const { string output = "hello"+" world"; return output; }
  </code></pre>
  
  <p>I get an error:</p>
  
  <pre><code>Grade.h: In member function ‘std::string Grade::toString() const’:
  Grade.h:29:53: error: invalid operands of types ‘const char [6]’ and ‘const char [7]’ to binary ‘operator+’
     string toString() const { string output = "hello"+" world"; return output; }
                                                       ^
  </code></pre>
  
  <p>I'm really at a loss for what it going on here... especially since I have done string concatenation earlier in the program without issue.
  What I would like is to output something like:</p>
  
  <p>"student+[some white space]+letter+[some white space]+className"</p>