上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页
摘要: 1 #include <iostream> 2 using namespace std; 3 class Point { 4 private: 5 int x; 6 int y; 7 public: 8 Point() { }; 9 friend istream& operator>>(istrea 阅读全文
posted @ 2022-09-13 22:38 balabalahhh 阅读(28) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; class MyInt { int nVal; public: MyInt( int n) { nVal = n ;} MyInt& operator-(int x){ nVal -= x; return *this; 阅读全文
posted @ 2022-09-13 22:37 balabalahhh 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <string> 3 #include <cstring> 4 using namespace std; 5 class MyString { 6 char * p; 7 public: 8 MyString(const char * 阅读全文
posted @ 2022-09-13 22:36 balabalahhh 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 class Base { 5 public: 6 int k; 7 Base(int n):k(n) { } 8 }; 9 class Big 10 { 11 pub 阅读全文
posted @ 2022-09-13 22:33 balabalahhh 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 class A { 4 public: 5 int val; 6 7 A(int 8 i = 123):val(i){}; 9 A& GetObj(){return *this;} 10 }; 11 int 阅读全文
posted @ 2022-09-13 22:32 balabalahhh 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 class A { 4 public: 5 int i; 6 A(int x) { i = x; } 7 ~A(){cout << i << endl;} 8 }; 9 int main() 10 { 11 阅读全文
posted @ 2022-09-13 22:31 balabalahhh 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cstring> 3 #include <cstdlib> 4 using namespace std; 5 class Complex { 6 private: 7 double r,i; 8 public: 9 void Pri 阅读全文
posted @ 2022-09-13 22:30 balabalahhh 阅读(34) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> #include <cstdio> #include <cstring> #include <sstream> #include <cstdlib> using namespace std; class Student { 阅读全文
posted @ 2022-09-13 22:28 balabalahhh 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 4 int main() 5 { 6 int * a[] = { 7 NULL 8 }; 9 10 *a[2] = 123; 11 a[3][5] = 456; 12 if(! a[0] ) { 13 co 阅读全文
posted @ 2022-09-13 22:25 balabalahhh 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 int & 4 getElement(int * a, int i) 5 { 6 return a[i]; 7 } 8 int main() 9 { 10 int a[] = {1,2,3}; 11 get 阅读全文
posted @ 2022-09-13 22:21 balabalahhh 阅读(9) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页