×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • About
  • One Liner
  • RANDOM
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • AI Engineering
  • Scholarship
  • Campus Ambassador

friend function

A collection of 1 post

C++

Friend Function in C++

C++ allows a mechanism, in which a non-member function has access permission to the private members of the class. This can be done by declaring a non-member function friend to the class whose private data is to be accessed. The friend is a keyword.

Shreya Gupta Shreya Gupta
OpenGenus IQ © 2026 All rights reserved â„¢ [email: team@opengenus.org]
Top Posts LinkedIn Twitter