正在加载图片...
#include <iostream.h> class test i int tl, t 2; public: test(int, int); test operator+0;∥前缀 test operator+(int);∥/后缀 test operator-0;∥前缀 test operator-(int);∥后缀 test:: test(int a, int btI=a; t2=b; 1 test test: operator++O 由由 cout<<"++test、n"; ++t1;++t2 return *this:#include <iostream.h> class test { int t1,t2; public: test(int,int); test operator++(); // 前缀 test operator++(int); // 后缀 test operator--() ; // 前缀 test operator--(int) ; // 后缀 }; test::test(int a,int b){t1=a;t2=b;} test test::operator++() { cout << ″++test \n″; ++t1; ++t2; return *this; } (续)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有