#include <iostream> using namespace std; class x { int i; public: x(int k) { i=k; } friend ostream& operator<<(ostream& os, const x& d1); }; ostream& operator<<(ostream& os, const x& d1) { os << d1.i ; return os; } int main() { x s1(20); cout << s1; }
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment