title: Why is my Code runing under codeblocks but not in VS Studio
body: <p>This line canot pass under VS Studio, But it is running under CodeBlocks. </p>
  
  <p><code>cg1.RegisterGoods("c++", 23, 32);</code></p>
  
  <p><code>'void CGoods::RegisterGoods(char [],int,float)': cannot convert argument 1 from 'const char [4]' to 'char []'</code></p>
  
  <p>like so:</p>
  
  <pre><code>#define _CRT_SECURE_NO_WARNINGS
  #include&lt;iostream&gt;
  #include &lt;cstring&gt;
  using namespace std;
  
  class CGoods
  {
  private:
      char    Name[21];
      int Amount;
      float   Price;
      float   Total_value;
  
  public:
      void  RegisterGoods(char name[], int amount, float price)
      {
          strcpy(Name,name);
          Amount = amount;
          Price = price;
      }
      void  CountTotal(void)
      {
          Total_value = Price * Amount;
      }
      void  GetName(char name[])
      {
          strcpy(name,Name);
      }
      int GetMount(void)
      {
          return Amount;
      }
  
      float GetPrice(void)
      {
          return Price;
      }
      float GetTotal(void)
      {
          return Total_value;
      }
  };
  
  int  main() {
      CGoods cg1;
      cg1.RegisterGoods("c++", 23, 32);
      cout&lt;&lt;cg1.GetPrice()&lt;&lt;endl;
      cout&lt;&lt;cg1.GetMount();
      return 0;
  }
  </code></pre>