title: a value of type "const char *" cannot be assigned to an entity of type "char" C OOP
body: <p>I am creating a class to calculate a grade for a user in C++ and I am coming across a simple yet annoying problem. I know what the errors means but I don't understand how to fix it and changing to a string actually fixes the issue but this is not what I want to do.</p>
  
  <p>here is the error: const char *" cannot be assigned to an entity of type "char</p>
  
  <p>Code</p>
  
  <pre><code>    #include &lt;string&gt;
  using namespace std;
  
  class Gradecalc
  {
  public:
      Gradecalc()
      {
          mark = 0;
      }
      int getmark()
      {
          return mark;
      }
      void setmark(int inmark)
      {
          mark = inmark;
  
      }
      void calcgrade()
      {
          if (mark &gt;=70)
          {
              grade = "A";      //**ERROR IS HERE**
          }
  
      }
      char getgrade()
      {
          return grade;
      }
  
  private:
      int mark;
      char grade; //VARIABLE IS DECLARED HERE
  };
  </code></pre>