My guess is that it is the MSVC friend bug. Try to download the approiate patch and the problem should be solved. If I remember it correctly you can avoid the bug by making
Code:
friend ostream & operator<<(ostream &,SimpleClass&);
inline like this
Code:
class SimpleClass
{
public:
SimpleClass();
SimpleClass(SimpleClass &);
~SimpleClass();
friend ostream & operator<<(ostream &o,SimpleClass &rhs)
{
o<<rhs.GetData();
return o;
}
int GetData();
void SetData(int);
void testfunction(SimpleClass);
private:
int itsData;
};
and remove the previous implementation. Skip this codesnippet
Code:
ostream& operator<<(ostream &o, SimpleClass &rhs)
{
o<<rhs.GetData();
return o;
}