title: Single line class declaration and instantiation
body: <p>I've stumbled upon code using the following syntax.</p>
  
  <pre><code>int main(){    
    class foo{
      public:
        int x;
        foo(int y){x=y;}
    }
    * bar = new foo(1);    
  }
  </code></pre>
  
  <p>Is there any purpose/consequence of using it compared to the more common</p>
  
  <pre><code>int main(){    
    class foo{
      public:
        int x;
        foo(int y){x=y;}
    };
  
    foo * bar = new foo(1);    
  }
  </code></pre>