摘要: #include <iostream> #include <string> using namespace std; template <class T> class CMyistream_iterator { // 在此处补充你的代码 public: T a; CMyistream_iterato 阅读全文
posted @ 2022-02-24 11:56 icefield817 阅读(85) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; class MyCin { // 在此处补充你的代码 public: bool flag = false; MyCin & operator>> (int & n) { cin >> n; if (n == -1 || 阅读全文
posted @ 2022-02-23 17:52 icefield817 阅读(153) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> using namespace std; // 在此处补充你的代码 template<class T,class F> T Filter(T ar,T arEnd, T resAr, F fun) { for (ar;ar 阅读全文
posted @ 2022-02-23 16:59 icefield817 阅读(61) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> using namespace std; template <class T> T SumArray(T(*ar), T(*arEnd)) { if (ar == arEnd) return * ar; T res = *a 阅读全文
posted @ 2022-02-23 12:10 icefield817 阅读(60) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> using namespace std; // 在此处补充你的代码 template<class T, class F> void MyForeach(T ar,T arEnd,F fun) { for (;ar != ar 阅读全文
posted @ 2022-02-23 12:08 icefield817 阅读(73) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; class A { private: int nVal; public: void Fun() { cout << "A::Fun" << endl; }; virtual void Do() { cout << "A 阅读全文
posted @ 2022-02-22 11:05 icefield817 阅读(48) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; class A { public: A() { } // 在此处补充你的代码 virtual ~A() { cout << "destructor A" << endl; } }; class B :public A 阅读全文
posted @ 2022-02-22 10:57 icefield817 阅读(60) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; class A { private: int nVal; public: void Fun() { cout << "A::Fun" << endl; }; void Do() { cout << "A::Do" << 阅读全文
posted @ 2022-02-22 10:51 icefield817 阅读(34) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; class B { private: int nBVal; public: void Print() { cout << "nBVal=" << nBVal << endl; } void Fun() { cout < 阅读全文
posted @ 2022-02-22 10:39 icefield817 阅读(44) 评论(0) 推荐(0) 编辑
摘要: #include <iomanip> #include <iostream> #include <string> using namespace std; static int n; static int nowCase = 1; static int* sumBloodArr; static in 阅读全文
posted @ 2022-02-22 10:08 icefield817 阅读(72) 评论(0) 推荐(0) 编辑