title: A value of type "const char*" cannot be used to initialize an entity of type "char *"
body: <p>I have a code like this but I keep receiving this error :<br></p>
  
  <pre><code>A value of type "const char*" cannot be used to initialize an entity of type "char *"
  </code></pre>
  
  <p>What is going on?<br>
  I have read up on the following threads but have not been able to see any result to my answer as all of them are either from <code>char</code> to <code>char*</code> or <code>char*</code> to <code>char</code>:<br>
  <a href="https://stackoverflow.com/questions/21030685/value-type-const-char-cannot-be-used-to-initialize-an-entity-of-type-char">Value type const char cannot be used to initialize an entity of type char*</a><br>
  <a href="https://stackoverflow.com/questions/24254183/value-of-type-char-cannot-be-used-to-initialize-an-entity-of-type-char">Value of type char* cannot be used to initialize an entity of type &quot;char&quot;</a></p>
  
  <pre><code>#include &lt;iostream&gt;;
  using namespace std;
  
  int main() {
      int x = 0; //variable x created
      int cars (14);//cars is created as a variable with value 14
      int debt{ -1000 };//debt created with value 1000
      float cash = 2.32;
      double credit = 32.32;
      char a = 'a';//for char you must use a single quote and not double
      char* sandwich = "ham";
      return 0;
  }
  </code></pre>
  
  <p>I am using Visual Studio Community 2017</p>