title: Char passing in C++ with pointers
body: <p>Im having unclear image of pointers and char passing with functions. please anyone can tell me where im doing wrong and brief idea about pointers?ex : where should i use them, etc...</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  class book{
  private:
      char *CName;
      int CFee;
      int NoPeople;
      int Income;
  public:
      void setData(char &amp;x,int y,int z){
          CName = &amp;x;
          CFee = y;
          NoPeople = z;
  
      }
      void calIncome(){
          Income = CFee * NoPeople;
  
      }
      void viewIncome(){
          cout&lt;&lt;Income;
          cout&lt;&lt;CName;
  
      }
  };
  int main(){
      book b1;
      b1.setData('DISE',20000,30);
      b1.calIncome();
      b1.viewIncome();
  }
  </code></pre>
  
  <p>im getting error in this code</p>
  
  <p>//b1.setData('DISE',20000,30); "non-const lvalue reference to type 'char' cannot bind to a temparory of type 'int'"</p>