Overloading the inserter and extractor operators

Question:
I would like to see examples of overloading the inserter and extractor operators.

Answer:

class MyClass{public:	void operator << (int i);};void foo (){	MyClass myclass;	myclass << 10;}

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: