What are Local Classes in C++?
Classes that are defined and used inside a function or a block are known as local classes. Lets take an example. void demo(int x) //enclosing function { ….. ….. class test //local class { ….. ….. //definition }; ….. ….. test t(x); //creating object ….. //use test object } Also Read: What is Slack Byte in …