title: Nested Class. error: expected parameter declarator - for inner class instance
body: <p>I started learning about nested classes in C++, I tried a quick code which I pasted here to see how nested classes work. But the compilation end with some errors which I can't figure out.</p>
  
  <p><strong>File: check.cpp</strong></p>
  
  <pre><code>class Outside{
      public:
          class Inside{
              private:
                  int mInside;
              public:
                  Inside(const int&amp; x):mInside(x){}
          };
      private:
          Inside mOutside(20);
  };
  
  int main(void){
  Outside o;
  return 0;
  }
  </code></pre>
  
  <p>The error which I get on compiling by <code>g++ -Wall -std=c++11 -o check.out check.cpp</code></p>
  
  <pre><code>check.cpp:12:25: error: expected parameter declarator
          Inside mOutside(20);
                          ^
  check.cpp:12:25: error: expected ')'
  check.cpp:12:24: note: to match this '('
          Inside mOutside(20);
                         ^
  </code></pre>
  
  <p>I need a good explanation behind this error and how to overcome this error.</p>