title: C++: What takes up more memory, storing a single character as char or string?
body: <p>I am writing code, where different parts of the code are executed depending on user input. If I am sure that the user will only input a single character, will a string or char take up more memory? Are there any other advantages of one way to another?</p>
  
  <p>EDIT:
  Here is an example of what I mean:</p>
  
  <pre><code>using namespace std;
  char operation;//or string
  cout &lt;&lt; "enter the operator (+/=):" &lt;&lt; endl;
  cin &gt;&gt; operation;
  if (operation == '+') {
  //do something
  }
  else {
  //do something else
  }
  </code></pre>