title: How to look if a char is equal to a new line
body: <p>I have a string, the string contains for example "Hello\nThis is a test.\n".</p>
  
  <p>I want to split the whole string on every \n in the string. I made this code already: </p>
  
  <pre><code>vector&lt;string&gt; inData = "Hello\nThis is a test.\n";
  
  for ( int i = 0; i &lt; (int)inData.length(); i++ )
  {
      if(inData.at(i) == "\n")
      {
      }
  }
  </code></pre>
  
  <p>But when I complite this, then I get an error:
  (\n as a string) </p>
  
  <pre><code>binary '==' : no operator found which takes a left-hand operand of type 'char' (or there is no acceptable conversion)
  </code></pre>
  
  <p>(above code)</p>
  
  <pre><code>'==' : no conversion from 'const char *' to 'int'
  
  '==' : 'int' differs in levels of indirection from 'const char [2]'
  </code></pre>
  
  <p>The problem is that I can't look if a char is equal to "new line". How can I do this?</p>