C/C++基础知识
不导翁
这个作者很懒,什么都没留下…
展开
-
C/C++处理字符串中的字符
头文件#include <cctype> 代码示例: #include <cctype> #include <iostream> using namespace std; int main() { string str = "012abcxyzABCXYZ \n\t~`!@#$%^&*()_+{}:\"|<>?[]\\;',./'"; cout << "\tisalnum" << "\tis原创 2021-03-30 11:00:31 · 184 阅读 · 0 评论 -
C++优先队列简单使用
简单使用 详细参考: https://blog.csdn.net/disguise666/article/details/85989788 struct Student{ //简单起见,只定义两个成绩变量 int num; int math; }; struct cmp{ bool operator ()(const Student s1, const Student s2){ return s1.math < s2.math; //最大优先队列, 如原创 2020-10-24 09:50:09 · 146 阅读 · 0 评论 -
STL源码剖析
STL源码剖析——空间的配置与释放 https://blog.csdn.net/baidu_28312631/article/details/47610933 STL源码剖析——vector的实现原理总结 https://blog.csdn.net/baidu_28312631/article/details/47335847 STL源码剖析——deque的实现原理和使用方法详解 https://...转载 2020-04-09 17:15:01 · 205 阅读 · 0 评论 -
C/C++排序函数
【C语言】快速排序函数qsort() https://blog.csdn.net/z944733142/article/details/80292613 C++排序函数sort https://blog.csdn.net/qq_41139830/article/details/80624216转载 2020-03-28 16:19:04 · 340 阅读 · 0 评论 -
C++ string类常用函数
C++ STL丨string 基本使用(一) https://blog.csdn.net/MissXy_/article/details/88547282 【C++】string详解 https://blog.csdn.net/qq_45239614/article/details/104666598转载 2020-03-28 15:31:30 · 73 阅读 · 0 评论 -
通过hanoi塔问题理解递归
hanoi塔问题的递归实现的代码 #include <stdio.h> #include <stdlib.h> void hanoi(int n, char A, char B, char C) { printf("n = %d\n", n); if(n == 1) printf("%c -> %c\n", A, C); e...原创 2020-03-20 23:16:54 · 236 阅读 · 0 评论 -
memset函数初始化
头文件#incldue <string.h> 静态数组 int num[10]; memset(num, 0, sizeof(num)); //初始化为 0 memset(num, -1, sizeof(num)); //初始化为 -1 memset(num, 127, sizeof(num)); //初始化为无穷大 memset(num, 128, sizeof(num...原创 2020-03-15 23:41:29 · 216 阅读 · 0 评论 -
C++ new的使用
C++ - new - 动态数组 - 初始化原创 2020-03-13 17:45:31 · 94 阅读 · 0 评论