上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页
摘要: class test{ 2 int mvalue; 3 public: 4 test(int i){ 5 cout << "test(int i) =" << i << endl; 6 mvalue = i; 7 } 8 int value(){ 9 return mvalue; 10 } 11 t 阅读全文
posted @ 2019-11-18 21:46 刘大侠GG_B 阅读(264) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> 2 using namespace std; 3 class test{ 4 int mvalue; 5 public: 6 test(int i){ 7 cout << "test(int i)=" << i << endl; 8 mvalue = i; 9 阅读全文
posted @ 2019-11-18 21:35 刘大侠GG_B 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1、设备的阻塞方式访问 应用编程 sd=socke(...) recv(sd, ....)//无数据阻塞等待 有数据立即返回 希望按键设备 也能达到在用户空间阻塞方式访问 内核中为了实现设备的阻塞方式访问,提供了一套机制: 等待队列 核心数据结构 wait_queue_head_t 实验步骤: 1) 阅读全文
posted @ 2019-11-18 19:11 刘大侠GG_B 阅读(574) 评论(0) 推荐(0) 编辑
摘要: 1. 关于Vim vim是我最喜欢的编辑器,也是linux下第二强大的编辑器。 虽然emacs是公认的世界第一,我认为使用emacs并没有使用vi进行编辑来得高效。 如果是初学vi,运行一下vimtutor是个聪明的决定。 (如果你的系统环境不是中文,而你想使用中文的vimtutor,就运行vimt 阅读全文
posted @ 2019-11-18 17:04 刘大侠GG_B 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include <stdio.h> 3 using namespace std; 4 class test{ 5 int mvalue; 6 public: 7 explicit test(int i=0){ //此处的explicit表明该构造函数需 阅读全文
posted @ 2019-11-18 17:02 刘大侠GG_B 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 1, #include<iostream> 2 2 #include<string> 3 3 using namespace std; 4 4 class test{ 5 5 int i; 6 6 public: 7 7 test(int i){ 8 8 cout << "test(int i)" 阅读全文
posted @ 2019-11-17 22:35 刘大侠GG_B 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 using namespace std; 3 class test{ 4 int mvalue; 5 public: 6 test(int i){ 7 mvalue = i; 8 } 9 int value(){ 10 return mvalue; 11 阅读全文
posted @ 2019-11-17 21:59 刘大侠GG_B 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 同步就是你叫我去吃饭,我听到了就和你去吃饭; 如果没有听到,你就不停的叫,直到我告诉你听到了,才一起去吃饭。异步就是你叫我,然后自己去吃饭,我得到消息后可能立即走,也可能等到下班才去吃饭。 所以,要我请你吃饭就用同步的方法,要请我吃饭就用异步的方法,这样你可以省钱。 同步是指:发送方发出数据后,等接 阅读全文
posted @ 2019-11-17 17:27 刘大侠GG_B 阅读(4802) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 class Test{ 5 private: 6 int*m_pointer; 7 public: 8 Test(){ 9 m_pointer = NULL; 10 } 阅读全文
posted @ 2019-11-16 21:41 刘大侠GG_B 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 函数调用 1 #include<string> 2 using namespace std; 3 //重载函数调用操作符() 4 //函数对象取代函数指针 5 class Fib{ 6 private: 7 int a0; 8 int a1; 9 public: 10 Fib():a0(0),a1( 阅读全文
posted @ 2019-11-16 19:42 刘大侠GG_B 阅读(128) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页