Possible Duplicate:
When should you use 'friend' in C++?
So I know a class or function can be keyworded as friend but what does that mean and how do I use it? I've tried reading around but no one explains what the following means:
class x{
public:
friend function(int x);
};
Why do i declare function a friend, what use does that give me. Also, what does it mean to declare a class a friend? thanks.