M
michael.goossens
It has come to my understanding that it is possible to implement
friend functions in non-local classes. But what is the difference with
a normal function? Can't the function already access the private data
of the class ...?
class B{
int x;
friend int addOne(int y){ return x + y};
}
vs
class B{
int x;
int addOne(int y){ return x + y);
}
whats the difference?
friend functions in non-local classes. But what is the difference with
a normal function? Can't the function already access the private data
of the class ...?
class B{
int x;
friend int addOne(int y){ return x + y};
}
vs
class B{
int x;
int addOne(int y){ return x + y);
}
whats the difference?