In a recent post by MyndFyre, he told someone to overload the << and >> to make a buffer look cool. I did this, but now I have a problem.
If I do something like:
*buff << dwval;
it works. But:
*buff << dwval1 << dwval2;
gives me a
error C2296: '<<' : illegal, left operand has type 'Buffer *' bufftest.cpp 130
This is my first venture into C++ operator overloading :/
You're probably returning the wrong type in your operator<<. You should return *this.
Yes, that worked. I was returning a pointer to the class. I see my error now.
Quote from: Shout on December 10, 2005, 04:17 PM
In a recent post by MyndFyre, he told someone to overload the << and >> to make a buffer look cool. I did this, but now I have a problem.
Thanks for trying to blame me! :P
Quote from: MyndFyre on December 10, 2005, 07:48 PM
Quote from: Shout on December 10, 2005, 04:17 PM
In a recent post by MyndFyre, he told someone to overload the << and >> to make a buffer look cool. I did this, but now I have a problem.
Thanks for trying to blame me! :P
Welcome :)