You could use operator overloading to make <<
do basically anything (just google "c++ operator overloading", you'll find tons of information), but such a thing as in your question is generally considered abuse of operator overloading. Overloading operators is intended to make code easier to read. In C++, everyone knows that <<
means "output something", just like +=
means "mathematically add something" and =
means "assign something".
When I see <<
in some piece of code, then I certainly don't read it as "set cursor position and then print text". You could implement it like this, but it's bad programming style, akin to misnaming ordinary functions.