05-02-2011, 06:52 AM
Code:
name.Setname(s.name.GetString());
// setting composed name of newly created object. i.e. Setname is a member function of “name “ object that is being called.
name.Setname(s.name.GetString());
//accessing the composed object string name of object to be copied. i.e. “name” is the data member of the object “s” of class student. Here, keep in mind that “name “ is placed a s a part Object of whole “Student”.
name.Setname(s.name.GetString());
//accessing the value of composed object string name by calling its member function GetString.i.e. GetString is a member function of an object “name” of class “String” that is being called and returns a constant pointer to a constant character.
name.Setname(s.name.GetString());
//overall result : the value of composed object string of object to be copied will be copied to newly created object composed object string. i.e. Parameters infact returns a constant pointer to the object which is being copied in the newly created object” name”
