title: Pass char array to parameterized constructor
body: <pre><code>class books{
  public:
      char* genre;
      books(char *n);
  };
  
  books::books(char*n){
      genre = new char[strlen(n)+1];
      strcpy(genre,n);
  }
  
  int main(){
     book harrypotter;
     char n[20]; 
     cin&gt;&gt;n;
     harrypotter.books(n);
  }
  </code></pre>
  
  <p>Help me to understand where is my fault? I think i've a lack 'bout pointer :( How to assign n[20] array to *genre member of class ? </p>