摘要: #include <iostream>#include <stdlib.h> using namespace std; class B{public: B() { cout << "B()" << endl; } ~B() { cout << "~B()" << endl; } int m_b1; 阅读全文
posted @ 2017-09-11 22:03 w6811645 阅读(150) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <stdlib.h> using namespace std; class A{public: int age; void test() { cout << "A()" << endl; }}; class B : public A{publi 阅读全文
posted @ 2017-09-11 22:01 w6811645 阅读(127) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <stdlib.h>#include <string>using namespace std; char GetChars(string &str, const int nStrIndex){ if (nStrIndex > (int)str. 阅读全文
posted @ 2017-09-11 22:00 w6811645 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 1 using System; //导入命名空间system中的类 2 using System.Collections.Generic; //导入System.Collections.Generic中的类 3 using System.Linq; 4 using System.Text; 5 using System.Thre... 阅读全文
posted @ 2017-06-16 14:48 w6811645 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 #include //函数可变参数模板.和vector类似 9 #include //assert()的头文件 10 11 //STL 12 #incl... 阅读全文
posted @ 2017-06-15 09:40 w6811645 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1 #include //默认写在最上方 2 #include //输入输出流 3 #include //宽字符 显示的头文件 ,以及函数 setlocale(LC_ALL,""); 4 5 #include //STL 6 #include //STL 7 #inc... 阅读全文
posted @ 2017-06-12 17:23 w6811645 阅读(1323) 评论(0) 推荐(0) 编辑
摘要: 做练习的时候,要求定义1个数组,然后全部元素重置为0,写完之后发现运行的不正确,想了下应该是和迭代器一样,指针移动了.需要重新获取 只是个人练习的,不做传播 阅读全文
posted @ 2017-06-09 11:44 w6811645 阅读(158) 评论(0) 推荐(0) 编辑
摘要: /* 最常用的数据结构是数组,其次是链表 数组的缺点是:插入和删除的时候内存开销大,因为元素需要移动 链表的插入速度非常快,元素不需要移动 1.数据域 2.链接域 */ 阅读全文
posted @ 2017-06-07 15:24 w6811645 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 class TestObject 5 { 6 public: 7 TestObject() 8 { 9 x = 10; 10 y = 20; 11 z = 30; 12 13 a = 'c'; 14 } 15 ... 阅读全文
posted @ 2017-06-07 09:43 w6811645 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 递归二分查找_I 3 迭代二分查找_R 4 5 */ 6 7 8 #include "BinarySearch_I_and_R.h" 9 #include 10 using namespace std; 11 int BinarySearch_I(int *a,int nLen,int nTarget); 12 in... 阅读全文
posted @ 2017-05-05 15:16 w6811645 阅读(248) 评论(0) 推荐(0) 编辑