title: Can there be two public section in a class? If yes then why ? And in which circumstances we do so?
body: <p>There is something bugging me about classes. For example</p>
  
  <pre><code>class A
  {
  public:
    A()
    {
    .....
    .....
    }
  
    void cleanup()
    {
    ....
    ....
    ....
    }
  
  public:
    UINT a;
    ULONG b;
  };
  </code></pre>
  
  <p>In the above example there are two public section. In the first section I am defining a constructor and a method and in the second section I am declaring data members. Is the above class i.e. A correct. Can we do that? If yes then why is that  needed and in what circumstances should we use it? Since we can do the entire thing in one section then why are there two sections?</p>