Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

public继承普通类,子类中可以直接用父类的protected和public成员 class base { protected: int a; typedef int value_type; }; class child : public base { public: void set(int o) { a = o; ...

概述 最大堆 时间复杂度: 取堆顶(最大元素):O(1) 插入/删除堆顶:O(logn),n为堆中元素数目 自定义判断“大”的函数:方法一:<操作符成员函数class T { ... bool operator<(const T&r){...} }; priority_queue<T> q...

https://blog.csdn.net/zhizhengguan/article/details/116108271 语法1:定义在.h.h文件: template <typename T> class the_class{ static int id; }; template <typename T> int the_class&l...

判断是否有某键,不用count而是用find,因为如果存在某键的话,count会返回键的所有个数,也就是会遍历所有,而不是找到了就返回 []向Fr中插入键n,值调用默认构造函数 if (Fr.find(n) == Fr.end()) { Fr[n]; }

调用可以和定义或申明不在一起 不分离申明和定义都放在.h文件中函数模板 template <typename T> void testprint(T i) { std::cout << i << std::endl; } 类模板 template <typename T> class A { T ...

栈:alignas specifier (since C++11) alignas specifier (since C++11) - cppreference.com Specifies the alignment requirement of a type or an object. Syntaxalignas( expression ) \1) expression must ...

new expression - cppreference.com Creates and initializes objects with dynamic storage duration, that is, objects whose lifetime is not necessarily limited by the scope in which they were created....

宏定义函数https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc.pdf搜索__VA_ARGS__ #define debug(format, ...) fprintf (stderr, format, __VA_ARGS__) Here ... is a variable argument. In the invocation of such a mac...

自动补全,添加历史https://blog.51cto.com/u_3078781/3287204 自定义换行符https://www.igiftidea.com/article/12962763210.html 官方文档https://web.mit.edu/gnu/doc/html/rlman_2.html 快捷键使用(该库支持的)https://flyyang.me/2017/05/0...

https://blog.csdn.net/springlustre/article/details/101177282