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 is c++ stringstream?

705


What is the role of static keyword for a class member variable?

727


Will a catch statement catch a derived exception if it is looking for the base class?

635


What is the use of c++ programming language in real life?

653


Is c++ a pure oop language?

699






What are the types of array in c++?

697


How does a C++ structure differ from a C++ class?

712


What is string in c++ programming?

719


What do the keywords volatile and mean mutable?

701


Does c++ have arraylist?

637


What are shallow and deep copy?

715


What are the important differences between c++ and java?

707


What is class definition in c++ ?

726


What is #include iostream h in c++?

729


Difference between class and structure.

794