A class can be defined inside a block or function. This type class is known local class. There are few points to be observed when producing class inside the function or block.
· Local class can use access global variable with scope operator (::).
· Local class cannot remain static data member.
· Local class member function must be defined inside its class that is it can have only inline function.