title: error: could not convert 'p1' from 'Person (*)()' to 'Person'
body: <p>I get </p>
  
  <pre><code>error: could not convert 'p1' from 'Person (*)()' to 'Person'
  </code></pre>
  
  <p>whenever i use the default constructor (when i create Person p1), i know it's because i'm using a char array but i have to use it, i can't use strings </p>
  
  <p>i'm also getting 2 warnings </p>
  
  <pre><code>warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]|
  </code></pre>
  
  <p>in the default constructor</p>
  
  <pre><code>warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]| 
  </code></pre>
  
  <p>when i create Person p2</p>
  
  <p>so here's my code</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  using namespace std;
  
  class Person{
     private:
      char* name;
      char gender;
      int age;
     public:
      Person();
      Person(char*, char, int);
      friend void printInfo(Person);
  };
  
  Person::Person()
  :name(NULL), gender(NULL), age(0) // this results in the first warning
  {
  }
  Person::Person(char* n, char g, int a)
  :name(n), gender(g), age(a)
  {
  }
  void printInfo(Person p){
   cout &lt;&lt; "Name: " &lt;&lt; p.name &lt;&lt; endl;
   cout &lt;&lt; "Age: " &lt;&lt; p.age &lt;&lt; endl;
   cout &lt;&lt; "Gender: " &lt;&lt; p.gender &lt;&lt; endl;
  }
  
  int main()
  {
  Person p1(); // this results in an error
  printInfo(p1);
  
  Person p2("Max", 'm', 18); // this results in the second warning
  printInfo(p2);
  
  return 0;
  }
  </code></pre>