View Single Post
  #2 (permalink)  
Old June 8th, 2004, 02:13 AM
ankur_vachhani ankur_vachhani is offline
Authorized User
 
Join Date: Jan 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ankur_vachhani
Default

Data hiding is concept of making your data private i.e. only accesible within the class member functions.

e.g
       class check
       {

           private:
/* This is private data cant access outside the class */
            int i ;
           public:
             int j;
         };

main()
{
  Check c1;

  c1.i=0; //// Error
   c1.j=0; ///works fine


}

       HTH






Two things to be rememeber always......

(1) Never tell all that u know
Reply With Quote