ローカル クラス内でメンバー変数を宣言できないことはわかっていstaticますが、その理由は明らかではありません。
では、誰か説明してください。
staticまた、ローカル クラスが定義されている関数内で定義された非変数に、ローカル クラス メンバー関数で直接アクセスできないのはなぜですか。
以下のコードでは:
int main(int argc, char *argv[])
{
    static size_t staticValue = 0;
    class Local
    {
         int d_argc; // non-static data members OK
         public:
         enum // enums OK
         {
             value = 5
         };
         Local(int argc) // constructors and member functions OK
         : // in-class implementation required
          d_argc(argc)
         {
               // global data: accessible
               cout << "Local constructor\n";
               // static function variables: accessible
               staticValue += 5;
         }
         static void hello() // static member functions: OK
         { 
            cout << "hello world\n";
         }
   };
   Local::hello(); // call Local static member
   Local loc(argc); // define object of a local class.
   return 0;
}
staticValue一方、静的変数は直接アクセスできますが、argc引数 frommainはそうではありません....