T
Tony Johansson
Hello experts!
Assume I have this class definition of class ListElem.
I'm a bit unsure how to interpret when you put friend declaration in public,
protected and private section of a class definition. If you insted have
declared a primitive type or a class type then I would understand it
completely.
I assume that having a friend declaration in the private section make no
sense.
I assume that you always put friend declaration in the public section.
Example 1
class ListElem
{
public:
friend class List
.. . .
};
Example 2
class ListElem
{
protected:
friend class List
.. . .
};
Exampl 3
class ListElem
{
private:
friend class List
.. . .
};
Many thanks
//Tony
Assume I have this class definition of class ListElem.
I'm a bit unsure how to interpret when you put friend declaration in public,
protected and private section of a class definition. If you insted have
declared a primitive type or a class type then I would understand it
completely.
I assume that having a friend declaration in the private section make no
sense.
I assume that you always put friend declaration in the public section.
Example 1
class ListElem
{
public:
friend class List
.. . .
};
Example 2
class ListElem
{
protected:
friend class List
.. . .
};
Exampl 3
class ListElem
{
private:
friend class List
.. . .
};
Many thanks
//Tony