S
sam_cit
Hi Everyone,
When a variable is declared as const, it is initialized along with
the declaration, as modification later on is not possible.
Having seen that, how about const variables in a class? Is it possible
for a class to have const variables? As just declaring the class alone
doesn't create any memory, only creation of objects results in memory
allocation for the object.
Thanks in advance!!!
When a variable is declared as const, it is initialized along with
the declaration, as modification later on is not possible.
Having seen that, how about const variables in a class? Is it possible
for a class to have const variables? As just declaring the class alone
doesn't create any memory, only creation of objects results in memory
allocation for the object.
Thanks in advance!!!