Calling a function which belongs to another class
<p>I'm just wondering if there is a way to call a function from another class which is not a derived class.</p>

<p>For example...</p>

<p>If I have class Square which has a function colour, if I have another class Triangle, totally unrealated to Square, can I somehow call the colour funciton of Square on a Triangle object?</p>

<p>I'm wondering if friend can be used here, but from what I have read, it can't, unless I've misunderstood what I've read.</p>

<p>What is the best way to implement this without creating an inheritance relationship?</p>
