title: Storing '\n' character from cin
body: <p>I need to get input from the user and store it as a character. The issue is including escape sequences.</p>
  
  <p>Here's an example:</p>
  
  <pre><code>string userInput;
  char delimiter;
  
  cout &lt;&lt; "Enter Delimiter: ";
  cin &gt;&gt; userInput;
  
  if(userInput == "\n"){
      delimiter = '\n';
  }
  else{
      delimiter = *userInput.c_str();
  }
  </code></pre>
  
  <p>When <code>userInput = \n</code>:</p>
  
  <p><code>userInput == "\n"</code> is false and <code>delimiter = \</code></p>
  
  <p>I need the delimiter to be the <code>\n</code> escape sequence, or any escape sequence, when the user chooses so. </p>