title: How to differentiate between char literal and unsigned int as a parameter for a constructor
body: <p>My Code has 2 different constructors, one with just an unsigned as a parameter and another one with a char and an unsigned, where the unsigned has a default value.</p>
  
  <pre><code>Myclass::Myclass(unsigned);
  Myclass::Myclass(const char, unsigned = 1);
  </code></pre>
  
  <p>The problem ist that when I try the following: </p>
  
  <pre><code>Myclass a = 'A';
  </code></pre>
  
  <p>the constructor with only the unsigned as parameter is called(in this example with 65)</p>
  
  <p>How can i have the second constructor be called in this case?
  I also dont want values from 0-255 to only be interpreted as Ascii values.</p>
  
  <p>EDIT:</p>
  
  <p>Example code that displays error:</p>
  
  <p>Header:</p>
  
  <pre><code>#ifndef Myclass_H_
  #define Myclass_H_
  
  class Myclass {
  public:
      Myclass(unsigned int = 10);
      Myclass(const char*);
      Myclass(char , unsigned int= 10);
      Myclass(const Myclass&amp;);
      virtual ~Myclass();
  };
  
  #endif /* Myclass_H_ */
  </code></pre>
  
  <p>Class body:</p>
  
  <pre><code>#include "Myclass.h"
  #include &lt;iostream&gt;
  
  using namespace std;
  
  Myclass::Myclass(unsigned int)
  {
      cout &lt;&lt; "unsigned" &lt;&lt; endl;
  }
  Myclass::Myclass(const char*)
  {
      cout &lt;&lt; "pointer" &lt;&lt; endl;
  }
  Myclass::Myclass(char , unsigned int)
  {
      cout &lt;&lt; "char" &lt;&lt; endl;
  }
  Myclass::Myclass(const Myclass&amp;)
  {
      cout &lt;&lt; "copy" &lt;&lt; endl;
  }
  Myclass::~Myclass(){}
  
  int main()
  {
      Myclass a = 'A';
      return 0;
  }
  </code></pre>
  
  <p>displays "unsigned" in console.</p>