friend functions scope

Are the two classes different in any way ? Does the scope of definition matter ?
.
.
class CSquare {
private:
int side;
friend class CRectangle;
public:
void set_side (int a)
{side=a;}
};
.
.
class CSquare {
private:
int side;
public:
friend class CRectangle;
void set_side (int a)
{side=a;}
};
No. friend declarations within a class can go anywhere.
Topic archived. No new replies allowed.