why can't we declare data member of class auto register or
extern

Answer Posted / kavitha shetty

since data members gets memory allocated through object not
individual..so always memory allocated for object...
otherwise u might get error like illegal storage class

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What should main() return in c and c++?

524


What language is a dll written in?

545


Is there a sort function in c++?

543


How to declare a pointer to an array of integers?

641


How many types of scopes are there in c++?

574






When should we use container classes instead of arrays?

580


How is c++ different from java?

558


When is the destructor called?

601


What is ios class in c++?

575


Can we distribute function templates and class templates in object libraries?

585


Explain what are the sizes and ranges of the basic c++ data types?

638


What is a c++ class?

611


When should we use multiple inheritance?

614


Describe public access specifiers?

580


What is exception handling? Does c++ support exception handling?

586