上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页
摘要: 1 #include <iostream> 2 using namespace std; 3 class MyCin 4 { 5 bool value; 6 public: 7 MyCin():value(true){ } 8 operator bool(){return value;} 9 MyC 阅读全文
posted @ 2022-09-13 22:53 balabalahhh 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 template<class T,class Pred> 5 T* Filter(T* p,T* q,T* s,Pred op){ 6 while(p < q){ 7 阅读全文
posted @ 2022-09-13 22:53 balabalahhh 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 template<class T,class Pred> 5 void MyForeach(T *p,T *q,Pred op){ 6 while(p != q){ 阅读全文
posted @ 2022-09-13 22:52 balabalahhh 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 template <class T> 5 T SumArray( 6 T *p,T *q){ 7 T sum = *p; 8 while(++ p != q) 9 s 阅读全文
posted @ 2022-09-13 22:52 balabalahhh 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 class A { 4 private: 5 int nVal; 6 public: 7 void Fun() 8 { cout << "A::Fun" << endl; }; 9 virtual void 阅读全文
posted @ 2022-09-13 22:51 balabalahhh 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 class A 4 { 5 public: 6 A() { } 7 virtual ~A() { cout << "destructor A" << endl; } 8 }; 9 class B:publi 阅读全文
posted @ 2022-09-13 22:51 balabalahhh 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 class B { 4 private: 5 int nBVal; 6 public: 7 void Print() 8 { cout << "nBVal="<< nBVal << endl; } 9 vo 阅读全文
posted @ 2022-09-13 22:49 balabalahhh 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1 #include <cstdlib> 2 #include <iostream> 3 using namespace std; 4 int strlen(const char * s) 5 { int i = 0; 6 for(; s[i]; ++i); 7 return i; 8 } 9 vo 阅读全文
posted @ 2022-09-13 22:47 balabalahhh 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cstring> 3 #include <cstdlib> 4 #include <cstdio> 5 using namespace std; 6 const int MAX = 110; 7 class CHugeInt { 8 阅读全文
posted @ 2022-09-13 22:43 balabalahhh 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cstring> 3 using namespace std; 4 5 class Array2 { 6 private: 7 int** arr; 8 int row,col; 9 public: 10 Array2(int i 阅读全文
posted @ 2022-09-13 22:42 balabalahhh 阅读(31) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页