-
What is the Size of an Empty Class
What is the logic behind size of an empty class = 1? (As per C++)Ex:class base {};main(){printf("Size of the Empty Class is: %dn", sizeof(base));}It gives output: Size of the Empty Class is: 1I have not got the reason / logic behind this.Can anyone help me?
-
Memory Allocation
When is memory allocated for a function of a class? Is it when the program is complied, or only when the function is called?