上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: #if 1 #include #include #include using namespace std; struct Node { int data; Node *next; }; //初始化 Node *init() { Node *head=new Node; head->next=NULL; return head; } //头插法创建节点 void insetLis... 阅读全文
posted @ 2019-03-17 11:44 学之初 阅读(374) 评论(0) 推荐(0) 编辑
摘要: #if 1 #include #include #include using namespace std; struct Node { int data; Node *next; }; //初始化 Node *init() { Node *head=new Node; head->next=NULL; return head; } //头插法创建节点 void insetLis... 阅读全文
posted @ 2019-03-16 11:15 学之初 阅读(994) 评论(0) 推荐(0) 编辑
摘要: #if 1 #include #include #include using namespace std; struct Node { int data; Node *next; }; //初始化 Node *init() { Node *head=new Node; head->next=NULL; return head; } //头插法创建节点 void insetLis... 阅读全文
posted @ 2019-03-15 13:42 学之初 阅读(1900) 评论(0) 推荐(0) 编辑
摘要: 总结:链表的遍历注意不要随意改变头指针的位置,进行合并时需要声明三个结构体指针用于进行合并,注意某一链表结束时需要进行链接,再释放生成的链表. 阅读全文
posted @ 2019-03-14 14:58 学之初 阅读(3100) 评论(0) 推荐(0) 编辑
摘要: #if 1 #include #include #include #include #include using namespace std; //类 class List { public: //构造器初始化,生成头节点 List() { head = new Node; head->next=NULL; } //成员函数 void createLis... 阅读全文
posted @ 2019-03-09 15:08 学之初 阅读(3975) 评论(0) 推荐(1) 编辑
摘要: cin 中“<<”流 输入运算符 cout <<setw(数字)<< 设置宽度类似于 %数字d 格式控制包含在头文件#include<iomanip>里,不可为负号数值过大,默认输出7位(含小数点) <<setfill(‘字符’)<<setw(数字) 在空白处,“前面”设置填充符,配合下面语句后面充 阅读全文
posted @ 2019-02-27 13:02 学之初 阅读(535) 评论(0) 推荐(0) 编辑
摘要: #include #include #define M 7 #define N 3 int main() { int a[M]={1,3,5,7,9,11,20}; int b[N]={2,6,8}; int c[M+N]={0}; int i=0; //a的下标 int j=0; //b的下标 int zu_he=0; //组合下标 ... 阅读全文
posted @ 2019-02-25 10:16 学之初 阅读(376) 评论(0) 推荐(0) 编辑
摘要: #include #include //先进行排序,在进行查找 void sort(int arr[10]) { int i,j,idx; for(i=0;iarr[j]) idx = j; } if(idx!=i) { int temp = arr[i]; ... 阅读全文
posted @ 2019-01-20 18:11 学之初 阅读(152) 评论(0) 推荐(0) 编辑
摘要: vimtutor -g zh 进入中文版学习手册 vim 编辑器 vim //直接进入编辑环境 vim myfile //进入编辑环境并打开(新建)文件 :q //直接退出 vim编辑环境 Esc //进入命令模式 shift+: //进入编辑模式 文本操作 i //命令模式输入i进入插入模式,插入 阅读全文
posted @ 2019-01-11 19:08 学之初 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 全称:Change Directory cd /xxx/xxx/ //绝对路径进入 cd //家(用户)目录 cd ./xxx //相对路径,进入文件夹也可以不加./ cd .. //回到上级目录 cd ../xxx //回到上级相对目录进入另一个文件夹 cd / //回到根目录 ./ //当前路径 阅读全文
posted @ 2019-01-10 20:19 学之初 阅读(169) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 下一页