Hi,
I am trying to put it into right words ,
Class is a seperate entity and function can be thought of as part of the class,
if you want to define it as part of the class. If it is not within class and defined seperately class can never ever be defined within it because class can include
both code and data (from the cocepts of OOPS) but function or procedure can not contain any substurcture inside it .
Is there any special reason that we cannot define a class inside a function We can instantiate a class inside a function but not define ?
What could be the cause of such a behavior?
We can define a class inside a class but not inside a function!
The same shall hold true for user defined types