Beginners Doubts

G

gopal.balakrishnan

Static member fuctions: are they inheritable,if yes then how, and will
they still be able to access only static data members of the base
class?? I do not have a compiler at home to test things, and i dont
have only books to learn the lang, help plz!
 
A

Alf P. Steinbach

* (e-mail address removed):
Static member fuctions: are they inheritable,

Yes, in the sense discussed below.

if yes then how,

They're accessible in the derived class just as in the base class,
unless they're declared 'private', and unless they're "shadowed" by
reuse of the names (but in that case the derived class code can access
them by qualifying the names).

and will
they still be able to access only static data members of the base
class??
Yes.


I do not have a compiler at home to test things,

See
<url: http://home.no.net/dubjai/win32cpptut/html/w32cpptut_01_01_02.html>

Also,
<url: http://www.comeaucomputing.com/tryitout/>

Beware, however, that a compiler may or may not conform to the standard
in various respects -- that even goes for the Comeau compiler, although
results from that compiler are usually regarded as definitive.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,204
Messages
2,571,063
Members
47,671
Latest member
peterweyand

Latest Threads

Top