上一页 1 2 3 4 5 6 7 8 ··· 13 下一页
摘要: 偶然看别人的题解了解到的(std::function是从C++11开始支持的特性) 在学function用法之前可以先了解一下C语言的函数指针,然后这里面还有类模板template、lambda表达式和重载方面的知识 function<void(TreeNode*)> DFS = [&] (Tree 阅读全文
posted @ 2022-11-23 20:20 balabalahhh 阅读(795) 评论(0) 推荐(0) 编辑
摘要: centos7(最小化安装),基本上每种方法都用了,最后一种办法成功的 yum无法使用解决方法(比较全,以后如果遇到别的问题还会添加) - 王章章章 - 博客园 (cnblogs.com) 阅读全文
posted @ 2022-11-23 15:38 balabalahhh 阅读(48) 评论(0) 推荐(0) 编辑
摘要: “不同的进程访问同样的逻辑地址而对应的物理地址不同,是由于各自页表的不同。linux系统下每个进程都拥有自己的页表,父进程fork出新的子进程时,子进程拷贝一份父进程的页表,且父子进程将页表状态修改为写保护。当父进程或子进程发生写操作时将会发生缺页异常,缺页异常处理函数将会为子进程分配新的物理地址“ 阅读全文
posted @ 2022-11-23 15:16 balabalahhh 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1.静态成员函数是不能使用 this 指针,因为静态成员函数相当于是共享的变量,不属于某个对象的变量 2.友元函数友元类C++友元函数和友元类(C++ friend关键字) (biancheng.net) 阅读全文
posted @ 2022-09-19 16:29 balabalahhh 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.这里的数字与ASCII码是对应的 1 #include <stdio.h> 2 3 int main(){ 4 char s[7] = {1,2,0,2,0,3}; 5 if(s[2] == 0) printf("%d",s[2] - '0'); 6 return 0; 7 } 输出为 -48: 阅读全文
posted @ 2022-09-18 22:59 balabalahhh 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <vector> 3 using namespace std; 4 5 6 struct A { 7 int v; 8 A() { } 9 A(int n):v(n) { }; 10 bool operator<(const A & 阅读全文
posted @ 2022-09-13 23:00 balabalahhh 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cmath> 3 #include <algorithm> 4 #include <string> 5 using namespace std; 6 template <class T1,class T2> 7 struct Clo 阅读全文
posted @ 2022-09-13 22:57 balabalahhh 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 4 bool Greater2(int n1,int n2) 5 { 6 return n1 > n2; 7 } 8 bool Greater1(int n1,int n2) 9 { 10 return n 阅读全文
posted @ 2022-09-13 22:56 balabalahhh 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <string> 3 4 using namespace std; 5 template <class T> 6 class CMyistream_iterator 7 { 8 private: 9 istream& in; 10 T 阅读全文
posted @ 2022-09-13 22:55 balabalahhh 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <string> 3 #include <cstring> 4 using namespace std; 5 template <class T> 6 class myclass { 7 private: 8 T* p; 9 int 阅读全文
posted @ 2022-09-13 22:54 balabalahhh 阅读(397) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页