title: Separating class code into a header and cpp file
body: <p>I am confused on how to separate implementation and declarations code of a simple class into a new header and cpp file. For example, how would I separate the code for the following class?</p>
  
  <pre><code>class A2DD
  {
    private:
    int gx;
    int gy;
  
    public:
    A2DD(int x,int y)
    {
      gx = x;
      gy = y;
    }
  
    int getSum()
    {
      return gx + gy;
    }
  };
  </code></pre>