Are Local class, Inner class and Nested class mean same things in C++?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Local Class and Nested class are different beasts.
A Nested class is a class declared within the scope of another class.
A Local class is declared within a function definition.
Inner class is a non standard C++ term, So I am not sure how to define it.
Nested Classes:
IBM Documentation as a nice documentation here.
To Summarize:
Local Classes:
This answer of mine here documents the subtle points associated with local classes.