You should use cout/cin in C++ programs, since printf and scanf are laughably non-type-safe.
And also, you can't overload the % flags in printf to output your own objects, but you can in C++:Trust me, use the streams.Code:cout << myobject << endl;




Reply With Quote