Rabu, 08 Februari 2017

What are local classes in C++ Programming

A class which is declared inside a function is called a local class. A local class is accessible only within the function it is declared. Following guidelines should be followed while using local classes: Local classes can access global variable only along with scope resolution operators. Local classes can access static variable declared inside a functions. Local classes cannot access auto variable declared inside a functions. Local classes cannot have static variables. Member functions must be defined inside the classes. Private members of the class cannot be accessed by the enclosing functions if it is not declared as a friend

The post What are local classes in C++ Programming appeared first on Coding Security.


What are local classes in C++ Programming
read more

Tidak ada komentar:

Posting Komentar