The friend keyword is used to give other classes and functions access to private and protected members of the class, even through they are defined outside the class`s scope.

https://codeeval.dev/gist/d0929f16c14a20d6a50bd5526ed17b36