用法总结
ryo_218
要努力成为别人的依赖呀!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
标准C++中的string类的用法总结
转自:https://www.cnblogs.com/aminxu/p/4686320.html 要想使用标准C++中string类,必须要包含 #include <string>// 注意是<string>,不是<string.h>,带.h的是C语言中的头文件 using std::string; using std::wstring; 或 u...转载 2018-08-09 16:07:37 · 657 阅读 · 0 评论 -
树的整理与总结
1.二叉树——四种遍历(下标) #define MAXN 100 struct node { int data; int lchild = -1; int rchild = -1; }tree[MAXN]; void preorder(int root) { if (root == -1) return; 对tree[root].data的操作; preord...原创 2018-09-08 00:06:36 · 323 阅读 · 0 评论 -
图的整理与总结
1.dijkstra算法 ①求从source到destination的最短路径(最短距离、最短路径条数、最短路径上的节点数以及路径) ②若最短路径不唯一,则再求从source到destination的最小代价 ③若最短路径还是不唯一,则再求从source到destination的最大节点权值和 #include <cstdio> #include <cstdlib>...原创 2018-09-07 22:31:19 · 223 阅读 · 0 评论 -
常用C++库函数与STL函数
1、ctype.h isalnum:判断一个字符是不是字母或数字 isdigit:判断一个字符是不是数字 isalpha:判断一个字符是不是字母 islower:判断一个字符是不是小写字母 isupper:判断一个字符是不是大写字母 tolower:将一个字母字符转成小写字母 toupper:将一个字母字符转成大写字母 2、stdlib.h atoi:将string转为int ...原创 2018-12-08 00:06:42 · 594 阅读 · 4 评论
分享