SlideShare a Scribd company logo
1 of 5
Download to read offline
2011


 Saket Kr. Pathak
 Software Developer
 3D Graphics




[C++ Friendship - Indeed what's it ...?]
 A quick review of fundamentals of C with an prospective view of implementation in daily day
to day life.
C++ Friendship - Indeed what's it...?

A few days back I was thinking, what is Friendship and who is the Friend
Indeed. I was really a bit puzzled about the real definition and the practical
implementation of Friendship in our Daily life.

Trust me :) this is quite dangerous word for me and if I will be bit specific then, I never-
ever understand the meaning and sense, when a prefix added with this dangerous word
and it becomes "Healthy Friendship" haa haa haa :). Most of the time I had seen gals
using it ... :)

I thought to look for the antonyms of "Healthy Friendship", because sometimes
antonyms give a hazy sense to understand the actual word. So, i surfed hard around all
big search engine as Google, Bing and Alta-Vista for "Unhealthy Friendship" but as the
result, completely failed ... :( . Then after all when every door i knocked didn't open ... :),
then I came to my dearest C++ and felt the actual implementation of word "Friend" with
complete sense.

What we call friend in our life is not the actual sense of Friend, because Friend has
access to all the Private things/matters or hasn't any restriction and I am dead sure
there is no-one who share their all private stuff/matters with any single one throughout
life. ohhhooo hooo hooo :) Here I am talking about singles as i don't have any experience
of doubles or about further steps of life.

Before commenting here or blaming me wrong, think a minute and then decide. What ...
Parents ...(***knows everything just till your school days), then What ... College
time fiends ...(***common it's teen age yaar haaa :) haa :), and every one
among us knows each other well ... ;) ), then comes ... Office Colleges ... (***ask
them, if they have free time after being jealous ... ?).

But after everything there is a relationship which can be said as Friendship, if and only if
they are ideal. That's we are going to consider as my example. Let's See .... (of-course
copy-past of snippet will work this time) ...

Friend Functions (syntax C++)

//____Class as a Lady
class Gal
{
    private:
        std::string str_Nam_mood;
    public:
        Gal();
        virtual ~Gal();
        void disp();

     //Friend - Function to access Private Members

Saket Kr. Pathak                                                                         Page 2
C++ Friendship - Indeed what's it...?

    friend void my_Guy(Gal &my_friend, std::string
str_what_happn);
};

Here in our class "Gal" has a friend as function, :) named as my_Guy(,). Whenever he
meets the gal and when she became sad, he changes her mood ... ;) (***execute this if
you want to see how ?)

Gal::Gal():            //Constructor
str_Nam_mood("I not feeling good :("){}

Gal::~Gal(){}                     //Destructor

void Gal::disp()         //Member Function definition
{
    printf("n%sn", str_Nam_mood.c_str());
}

Here our dear friend my_Guy(,) function changing the mood of his Gal ... ;). As
conceptual point of view function has the access to private members of class and It can't
be said as the member function, because friend function can't be accessed by scope-
resolution, dot or arrow operators with class.

void my_Guy(Gal &my_friend, std::string str_what_happn)
//Friend Function Definition
{
    my_friend.str_Nam_mood = str_what_happn;
}

Let's have main function regarding this Gal class.

int main()
{
    Gal aGal;

    aGal.disp();
    my_Guy(aGal, "Have some Ferrero Rocher and Let's go Agra to
see Taj!");
    aGal.disp();
}
//****




Saket Kr. Pathak                                                                   Page 3
C++ Friendship - Indeed what's it...?

Friend Class (syntax C++)

Here for explaining friend-class, Yes I am going to take help from previous example with
some addition. So, there will be a forward declaration of a class who is the friend of our
previous class as;

class Guy;

Then a bit change in Gal class as;

//____Class as a Lady
class Gal
{
    friend class Guy;             //friend class as a Soulmate
    private:
        std::string str_Nam_mood;
    public:
        Gal();
        virtual ~Gal();
        void disp();
};
Gal::Gal():             //Constructor
str_Nam_mood("I not feeling good :(")
{}

Gal::~Gal()                     //Destructor
{}

void Gal::disp()
{
    printf("n%sn", str_Nam_mood.c_str());
}

Let's see how this class takes care of his friend who has given him complete access. He
feels all the happiness that the Gal - class can imagine ... :)

//___Class as a Man
class Guy
{
    public:
        Guy();
        virtual ~Guy();
        void please_change_ur_mood(Gal &dear_friend, std::string
outing);
};

Guy::Guy()                    //Constructor

Saket Kr. Pathak                                                                    Page 4
C++ Friendship - Indeed what's it...?

{}

Guy::~Guy()                     //Destructor
{}

void Guy::please_change_ur_mood(Gal &dear_friend, std::string
str_what_happn)
{
    dear_friend.str_Nam_mood = str_what_happn;
}

Now main() playing as the role of life and have a definition as,

int main()
{
    Gal aGal;
    aGal.disp();

    Guy aGuy;
    aGuy.please_change_ur_mood(aGal, "Let's marry again and We
will visit to Rome, this time!");
    aGal.disp();

     return 0;
}

Now that's a friend having complete trust and in-dependency with all the prospective
views of respect and so, ... :) ... I LOVE IT ... :) haaa haa haaa :). Hmmm :) as per
principle's of the concept, we need to notice a few points as;

Friendship is not mutual unless explicitly specified. (i.e. If you don’t introduce her/him
to your friends, then she/he is just stranger for them and I remember a song "Don't talk
to the Strangers ... Don't talk the Strangers ... Strangers Strangers" ... :) )

Friendship is not inherited. So, Inheritance stands outside here ... :)

Friendship is not transitive. (It's not mandatory that, your friend will has to be a friend
of your mate.)

That's why I like C++. :)

Ok so I don't think, It's needed to say It's completely my Prospective view to the concept
which may vary from you. So don't be personal, enjoy it ... at least try ... :)

Same as always take care in someone's style not mine, i used say catch you again :)



Saket Kr. Pathak                                                                      Page 5

More Related Content

Viewers also liked

Inheritance chapter-6-computer-science-with-c++ opt
Inheritance chapter-6-computer-science-with-c++ optInheritance chapter-6-computer-science-with-c++ opt
Inheritance chapter-6-computer-science-with-c++ optdeepakskb2013
 
A Guy and gal in STL
A Guy and gal in STLA Guy and gal in STL
A Guy and gal in STLSaket Pathak
 
Functions assignment
Functions assignmentFunctions assignment
Functions assignmentAhmad Kamal
 
Standard Template Library
Standard Template LibraryStandard Template Library
Standard Template LibraryNilesh Dalvi
 
Lab. Programs in C
Lab. Programs in CLab. Programs in C
Lab. Programs in CSaket Pathak
 
1. Overview of Java
1. Overview of Java1. Overview of Java
1. Overview of JavaNilesh Dalvi
 
C++ diamond problem
C++ diamond problemC++ diamond problem
C++ diamond problemSaket Pathak
 
Oops practical file
Oops practical fileOops practical file
Oops practical fileAnkit Dixit
 
GNU GCC - what just a compiler...?
GNU GCC - what just a compiler...?GNU GCC - what just a compiler...?
GNU GCC - what just a compiler...?Saket Pathak
 
Wan Important Questions
Wan Important QuestionsWan Important Questions
Wan Important QuestionsSaket Pathak
 
Object-Oriented Design: Multiple inheritance (C++ and C#)
Object-Oriented Design: Multiple inheritance (C++ and C#)Object-Oriented Design: Multiple inheritance (C++ and C#)
Object-Oriented Design: Multiple inheritance (C++ and C#)Adair Dingle
 
Multiple inheritance in c++
Multiple inheritance in c++Multiple inheritance in c++
Multiple inheritance in c++Saket Pathak
 
#OOP_D_ITS - 6th - C++ Oop Inheritance
#OOP_D_ITS - 6th - C++ Oop Inheritance#OOP_D_ITS - 6th - C++ Oop Inheritance
#OOP_D_ITS - 6th - C++ Oop InheritanceHadziq Fabroyir
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructorsNilesh Dalvi
 

Viewers also liked (20)

Inheritance chapter-6-computer-science-with-c++ opt
Inheritance chapter-6-computer-science-with-c++ optInheritance chapter-6-computer-science-with-c++ opt
Inheritance chapter-6-computer-science-with-c++ opt
 
A Guy and gal in STL
A Guy and gal in STLA Guy and gal in STL
A Guy and gal in STL
 
14. Linked List
14. Linked List14. Linked List
14. Linked List
 
Functions assignment
Functions assignmentFunctions assignment
Functions assignment
 
Standard Template Library
Standard Template LibraryStandard Template Library
Standard Template Library
 
Copy constructor
Copy constructorCopy constructor
Copy constructor
 
Lab. Programs in C
Lab. Programs in CLab. Programs in C
Lab. Programs in C
 
1. Overview of Java
1. Overview of Java1. Overview of Java
1. Overview of Java
 
C++ diamond problem
C++ diamond problemC++ diamond problem
C++ diamond problem
 
Oops practical file
Oops practical fileOops practical file
Oops practical file
 
GNU GCC - what just a compiler...?
GNU GCC - what just a compiler...?GNU GCC - what just a compiler...?
GNU GCC - what just a compiler...?
 
Wan Important Questions
Wan Important QuestionsWan Important Questions
Wan Important Questions
 
Operator overloading
Operator overloadingOperator overloading
Operator overloading
 
Object-Oriented Design: Multiple inheritance (C++ and C#)
Object-Oriented Design: Multiple inheritance (C++ and C#)Object-Oriented Design: Multiple inheritance (C++ and C#)
Object-Oriented Design: Multiple inheritance (C++ and C#)
 
C++ Template
C++ TemplateC++ Template
C++ Template
 
Php Tutorials for Beginners
Php Tutorials for BeginnersPhp Tutorials for Beginners
Php Tutorials for Beginners
 
Strings
StringsStrings
Strings
 
Multiple inheritance in c++
Multiple inheritance in c++Multiple inheritance in c++
Multiple inheritance in c++
 
#OOP_D_ITS - 6th - C++ Oop Inheritance
#OOP_D_ITS - 6th - C++ Oop Inheritance#OOP_D_ITS - 6th - C++ Oop Inheritance
#OOP_D_ITS - 6th - C++ Oop Inheritance
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 

C++ Friendship - What it truly means

  • 1. 2011 Saket Kr. Pathak Software Developer 3D Graphics [C++ Friendship - Indeed what's it ...?] A quick review of fundamentals of C with an prospective view of implementation in daily day to day life.
  • 2. C++ Friendship - Indeed what's it...? A few days back I was thinking, what is Friendship and who is the Friend Indeed. I was really a bit puzzled about the real definition and the practical implementation of Friendship in our Daily life. Trust me :) this is quite dangerous word for me and if I will be bit specific then, I never- ever understand the meaning and sense, when a prefix added with this dangerous word and it becomes "Healthy Friendship" haa haa haa :). Most of the time I had seen gals using it ... :) I thought to look for the antonyms of "Healthy Friendship", because sometimes antonyms give a hazy sense to understand the actual word. So, i surfed hard around all big search engine as Google, Bing and Alta-Vista for "Unhealthy Friendship" but as the result, completely failed ... :( . Then after all when every door i knocked didn't open ... :), then I came to my dearest C++ and felt the actual implementation of word "Friend" with complete sense. What we call friend in our life is not the actual sense of Friend, because Friend has access to all the Private things/matters or hasn't any restriction and I am dead sure there is no-one who share their all private stuff/matters with any single one throughout life. ohhhooo hooo hooo :) Here I am talking about singles as i don't have any experience of doubles or about further steps of life. Before commenting here or blaming me wrong, think a minute and then decide. What ... Parents ...(***knows everything just till your school days), then What ... College time fiends ...(***common it's teen age yaar haaa :) haa :), and every one among us knows each other well ... ;) ), then comes ... Office Colleges ... (***ask them, if they have free time after being jealous ... ?). But after everything there is a relationship which can be said as Friendship, if and only if they are ideal. That's we are going to consider as my example. Let's See .... (of-course copy-past of snippet will work this time) ... Friend Functions (syntax C++) //____Class as a Lady class Gal { private: std::string str_Nam_mood; public: Gal(); virtual ~Gal(); void disp(); //Friend - Function to access Private Members Saket Kr. Pathak Page 2
  • 3. C++ Friendship - Indeed what's it...? friend void my_Guy(Gal &my_friend, std::string str_what_happn); }; Here in our class "Gal" has a friend as function, :) named as my_Guy(,). Whenever he meets the gal and when she became sad, he changes her mood ... ;) (***execute this if you want to see how ?) Gal::Gal(): //Constructor str_Nam_mood("I not feeling good :("){} Gal::~Gal(){} //Destructor void Gal::disp() //Member Function definition { printf("n%sn", str_Nam_mood.c_str()); } Here our dear friend my_Guy(,) function changing the mood of his Gal ... ;). As conceptual point of view function has the access to private members of class and It can't be said as the member function, because friend function can't be accessed by scope- resolution, dot or arrow operators with class. void my_Guy(Gal &my_friend, std::string str_what_happn) //Friend Function Definition { my_friend.str_Nam_mood = str_what_happn; } Let's have main function regarding this Gal class. int main() { Gal aGal; aGal.disp(); my_Guy(aGal, "Have some Ferrero Rocher and Let's go Agra to see Taj!"); aGal.disp(); } //**** Saket Kr. Pathak Page 3
  • 4. C++ Friendship - Indeed what's it...? Friend Class (syntax C++) Here for explaining friend-class, Yes I am going to take help from previous example with some addition. So, there will be a forward declaration of a class who is the friend of our previous class as; class Guy; Then a bit change in Gal class as; //____Class as a Lady class Gal { friend class Guy; //friend class as a Soulmate private: std::string str_Nam_mood; public: Gal(); virtual ~Gal(); void disp(); }; Gal::Gal(): //Constructor str_Nam_mood("I not feeling good :(") {} Gal::~Gal() //Destructor {} void Gal::disp() { printf("n%sn", str_Nam_mood.c_str()); } Let's see how this class takes care of his friend who has given him complete access. He feels all the happiness that the Gal - class can imagine ... :) //___Class as a Man class Guy { public: Guy(); virtual ~Guy(); void please_change_ur_mood(Gal &dear_friend, std::string outing); }; Guy::Guy() //Constructor Saket Kr. Pathak Page 4
  • 5. C++ Friendship - Indeed what's it...? {} Guy::~Guy() //Destructor {} void Guy::please_change_ur_mood(Gal &dear_friend, std::string str_what_happn) { dear_friend.str_Nam_mood = str_what_happn; } Now main() playing as the role of life and have a definition as, int main() { Gal aGal; aGal.disp(); Guy aGuy; aGuy.please_change_ur_mood(aGal, "Let's marry again and We will visit to Rome, this time!"); aGal.disp(); return 0; } Now that's a friend having complete trust and in-dependency with all the prospective views of respect and so, ... :) ... I LOVE IT ... :) haaa haa haaa :). Hmmm :) as per principle's of the concept, we need to notice a few points as; Friendship is not mutual unless explicitly specified. (i.e. If you don’t introduce her/him to your friends, then she/he is just stranger for them and I remember a song "Don't talk to the Strangers ... Don't talk the Strangers ... Strangers Strangers" ... :) ) Friendship is not inherited. So, Inheritance stands outside here ... :) Friendship is not transitive. (It's not mandatory that, your friend will has to be a friend of your mate.) That's why I like C++. :) Ok so I don't think, It's needed to say It's completely my Prospective view to the concept which may vary from you. So don't be personal, enjoy it ... at least try ... :) Same as always take care in someone's style not mine, i used say catch you again :) Saket Kr. Pathak Page 5