title: How can I properly assign a char* in c++?
body: <p>My c++ code looks like this:</p>
  
  <pre><code>char* x;
      switch(i){ 
          case 0:
              x = '0';
          case 1:
              x = "1";
          ...}
  </code></pre>
  
  <p>I can't figure out how to make this work because for the first <code> x = '0'; </code> the compiler complains with:</p>
  
  <pre><code>error: invalid conversion from ‘char’ to ‘char*’
  </code></pre>
  
  <p>and for the second <code>x = "1";</code> the compiler complains with:</p>
  
  <pre><code>warning: deprecated conversion from string constant to ‘char*’
  </code></pre>
  
  <p>What should I do here? Am I going about this completely wrong?</p>