Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old October 2nd, 2008, 02:02 PM
Newbie
 
Join Date: Sep 2008
Posts: 26
Wink 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
Moderator
 
Join Date: Mar 2007
Location: Voorschoten, the Netherlands
Age: 52
Posts: 8,493
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: 26
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

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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 network members.
Post your question now . . .
It's fast and it's free

Popular Articles