title: Using class pointers vs instance
body: <p>What I don't understand is what is the difference between using a pointer to a class and generating a new instance of it. It's just for performance? Here I made a class and made m the pointer to the class and n the instance of the class.
  And another question: can i make a pointer the class and use another constructor? like <code>myClass* p(7); p-&gt;afis();</code> ?</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class myClass
  {
      int a;
  public:
      myClass(void);
      myClass(int);
      void afis();
      ~myClass(void);
  };
  
  myClass::myClass(void)
  {
      a = 5;
  }
  
  myClass::myClass(int nr)
  {
      a = nr;
  }
  
  void myClass::afis()
  {
      cout &lt;&lt; a;
  }
  
  myClass::~myClass()
  {
  }
  
  int main()
  {
      myClass* m;                                     //&lt;--
      m-&gt;afis();
  
      myClass n(7);                                   //&lt;--
      n.afis();
  
      cin.get();
  }
  </code></pre>