title: Calculator 08 Buggy Program - Debug Issue
body: <p>I am trying to solve the first exercise of Stroustrup's book about C++ programming principles. I'm pretty stuck with two issues. </p>
  
  <p>The first is that he says that there are three Compile-Time errors but I can see just one and, my second answer, is to ask to you if you can explain me better what kind of issue it is.</p>
  
  <pre><code>    struct Token {
      char kind;
      double value;
      string name;
      Token(char ch) :kind(ch), value(0) { }
      Token(char ch, double val) :kind(ch), value(val) { }
  };
  
  class Token_stream {
      bool full;
      Token buffer;
  public:
      Token_stream() :full(0), buffer(0) { }
  
      Token get();
      void unget(Token t) { buffer = t; full = true; }
  
      void ignore(char);
  };
  
  const char let = 'L';
  const char quit = 'Q';
  const char print = ';';
  const char number = '8';
  const char name = 'a';
  
  Token Token_stream::get()
  {
      if (full) { full = false; return buffer; }
      char ch;
      cin &gt;&gt; ch;
      switch (ch) {
      case '(':
      case ')':
      case '+':
      case '-':
      case '*':
      case '/':
      case '%':
      case ';':
      case '=':
          return Token(ch);
      case '.':
      case '0':
      case '1':
      case '2':
      case '3':
      case '4':
      case '5':
      case '6':
      case '7':
      case '8':
      case '9':
      {   cin.unget();
      double val;
      cin &gt;&gt; val;
      return Token(number, val);
      }
      default:
          if (isalpha(ch)) {
              string s;
              s += ch;
              while (cin.get(ch) &amp;&amp; (isalpha(ch) || isdigit(ch))) s = ch;
              cin.unget();
              if (s == "let") return Token(let);
              if (s == "quit") return Token(name);
              return Token(name, s);
          }
          error("Bad token");
      }
  }
  
  void Token_stream::ignore(char c)
  {
      if (full &amp;&amp; c == buffer.kind) {
          full = false;
          return;
      }
      full = false;
  
      char ch;
      while (cin &gt;&gt; ch)
          if (ch == c) return;
  }
  
  struct Variable {
      string name;
      double value;
      Variable(string n, double v) :name(n), value(v) { }
  };
  </code></pre>
  
  <p>He created a struct of a token, then he wrote a struct for a variable too that stores a name and a corresponding value. I can't figure out how to solve the compile-time error about  <code>return Token(name,s);</code>. It says (correctly) that it is impossible to convert a const char name in string. I tried to work on and convert it declaring as string but it didn't work.</p>
  
  <p>Can you help me please?</p>
  
  <p>Thank you very much!</p>
  
  <p>Leo</p>