Connecting Tech Pros Worldwide Help | Site Map
Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old October 2nd, 2008, 02:02 PM
Newbie
 
Join Date: Sep 2008
Posts: 27
Default confuse about protected and private members of a class...

what is the difference between a protected and a private members of a class?
can someone explain it to me..
tnx..
Reply
  #2  
Old October 2nd, 2008, 02:31 PM
JosAH's Avatar
Moderator
 
Join Date: Mar 2007
Location: Voorschoten, the Netherlands
Age: 52
Posts: 8,760
Default

Private members can only be accessed by objects of the class in which the private object is defined.
Protected members can also be accessed by objects of classes that are a sub class in which the object is defined.

kind regards,

Jos
Reply
  #3  
Old October 2nd, 2008, 03:02 PM
Newbie
 
Join Date: Sep 2008
Posts: 27
Default

Quote:
Originally Posted by JosAH
Private members can only be accessed by objects of the class in which the private object is defined.
Protected members can also be accessed by objects of classes that are a sub class in which the object is defined.

kind regards,

Jos
thanks my friend!! :-) keep it up!!
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.