摘要:1,消息队列: https://kb.cnblogs.com/page/537914/ 2,fork中父进程和子进程的资源联系: https://blog.csdn.net/weixin_42250655/article/details/81605369 3,多线程为什么会死锁,死锁如何解除? ht
阅读全文
摘要:1,索引的原理: https://www.cnblogs.com/songwenjie/p/9414960.html https://blog.csdn.net/qq_32924343/article/details/80199977(值得一看) 2,聚簇索引和非聚簇索引: 重要区别:该索引中键值的
阅读全文
摘要:1,若服务器方单独终止之后,客户端继续发数据会怎么样? https://blog.csdn.net/Nick_666/article/details/78342442 https://www.zhihu.com/question/35013918/answer/63664974(值得一看) 2,GE
阅读全文
摘要:1,智能指针:auto_ptr(c++11 已经弃用),unique_ptr(用于取代 auto_ptr), shared_ptr, weak_ptr http://www.cnblogs.com/TenosDoIt/p/3456704.html(值得一看) https://blog.csdn.ne
阅读全文
摘要:1,从无序的数据流中找到其中位数:(用大根堆和小根堆来实现) 1 float getMidimum(vector<int>& nums) { 2 priority_queue<int> bigHeap; // 大数优先 3 priority_queue<int, vector<int>, great
阅读全文
摘要:1,extern 关键字作用: http://www.cnblogs.com/lzjsky/archive/2010/11/24/1886686.html 2,static 关键字作用: https://baike.sogou.com/v3239767.htm?fromTitle=static ht
阅读全文
摘要:树的测试框架: 1 // leetcodeTree.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include <iostream> 6 #include <queue> 7 #include <stack> 8 #include <ve
阅读全文
摘要:1,VS2013: 错误 1 error LNK2019: 无法解析的外部符号 "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<c
阅读全文
摘要:1,VS2013 错误 1 error C2556: “const int &Array<int>::operator [](int)”: 重载函数与“int &Array<int>::operator [](int)”只是在返回类型上不同 出错代码: 出错原因: 在 C++ 中,两个只有返回类型不
阅读全文
摘要:1,一个类模板至少具有一个类参数,类参数是个符号以表示将要被某个确定数据类型代替的类型。 1 #include<iostream> 2 #include<string> 3 4 using namespace std; 5 6 template <class T> 7 class Array { 8
阅读全文
摘要:1,多态是一种运行期绑定机制,通过这种机制,实现将函数名绑定到函数具体实现代码的目的。一个函数的名称与其入口地址是紧密相连的,入口地址是该函数在内存中的起始地址。如果对一个函数的绑定发生在运行时刻而非编译时刻,我们就称该函数是多态的。 2,C++多态的三个前提条件:(a)必须存在一个继承体系结构;(
阅读全文
摘要:1,派生类继承了基类的所有成员函数和数据成员(构造函数、析构函数和操作符重载函数外)。 2,当不指明继承方式时,默认为私有继承。 3,基类的私有成员仅在基类中可见,在派生类中是不可见的。基类的私有成员可以由派生类继承,但在派生类中不可见。尽管在派生类中不能直接访问基类的私有成员,但可以通过间接的方式
阅读全文
摘要:1,Valid Parentheses 1 bool isVaild1(string& s) { // 直接列举,不易扩展 2 stack<char> stk; 3 for (int i = 0; i < s.length(); ++i) { 4 if (stk.empty()) 5 stk.pus
阅读全文
摘要:1,Vaild Palindrome 1 bool isPalindrome(string& s) { 2 transform(s.begin(), s.end(), s.begin(), tolower); // 把字符全部转换成小写 3 int left = 0; 4 int right = s
阅读全文
摘要:1,strtod: 函数原型: 1 #include <cstdlib> 2 double strtod(const char *nptr, char **endptr); 名称含义: strtod(将字符串转换成浮点数) 相关函数: strtof(float),strtol(long int),s
阅读全文