• Post Reply Bookmark Topic Watch Topic
  • New Topic

Nested class - instantiation  RSS feed

 
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to instantiate the class Inner extending StInner . Its giving error if i try in the below ways?


Regards.

 
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because Inner is not static, it needs to be bound to an instance of the enclosing class (StInner).

If you want to make that in3, the following should work (this is from memory, so no warranty):

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!