Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <strstream>
- #include <sstream>
- #include <iostream>
- #include <iomanip>
- using namespace std;
- class SpyOutput(){
- public
- spy(*spy){
- std::stringstream *spy;
- }
- int getcuont(){
- return 0;
- }
- int getchecksum(){
- return 0;
- }
- }
- void main()
- {
- double d1 = 12.3;
- int i1 = 45;
- SpyOutput spy(&cout);
- spy << "abc" << endl;
- spy << "d1=" << d1 << " i1=" << i1 << 'z' << endl;
- cout << "count=" << spy.getCount() << endl;
- cout << "Check Sum=" << spy.getCheckSum() << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment