Home arrow C++ arrow C++ Tricks of the Trade: Friend Functions
C++

C++ Tricks of the Trade: Friend Functions


Friend classes in C++ give us access to non-member functions or other classes. In this article Kais shows us exactly how and why we should use friend classes and functions.

Author Info:
By: Kais Dukes
Rating: 4 stars4 stars4 stars4 stars4 stars / 73
June 21, 2002
TABLE OF CONTENTS:
  1. · C++ Tricks of the Trade: Friend Functions
  2. · Friendly Friends
  3. · Commutative Operators
  4. · Friend Classes
  5. · Conclusion

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
C++ Tricks of the Trade: Friend Functions
(Page 1 of 5 )

This new "C++ Tricks of the Trade" series of articles will show you how to write efficient yet maintainable C++ code, as well as explaining how to avoid common programming pitfalls.

In this introductory article, Kais discusses how to use friend functions to enhance a class interface.
blog comments powered by Disqus
C++ ARTICLES

- Intel Threading Building Blocks
- Threading Building Blocks with C++
- Video Memory Programming in Text Mode
- More Tricks to Gain Speed in Programming Con...
- Easy and Efficient Programming for Contests
- Preparing For Programming Contests
- Programming Contests: Why Bother?
- Polymorphism in C++
- Overview of Virtual Functions
- Inheritance in C++
- Extending the Basic Streams in C++
- Using Stringstreams in C++
- Custom Stream Manipulation in C++
- General Stream Manipulation in C++
- Serialize Your Class into Streams in C++

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials