![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
fxh_bool
我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国我爱中国
展开
-
c++成员函数指针
在stl中有些地方用到了成员函数指针。之前对 .* 和->*运算符一直不明白。原创 2015-11-04 21:01:29 · 238 阅读 · 0 评论 -
*p++
++和*是同一优先级,自右向左结合。*p++:++是一个函数,在变量右侧时返回的p原来的值,但是在该函数中p的值已经加过了。*p++:++是一个函数,在变量左侧时返回的p已经加过的值。个人理解。原创 2015-11-04 21:06:00 · 363 阅读 · 0 评论 -
c++模板特化
#include #include #include using namespace std;templateclass T>bool IsEqual(T t1, T t2){ return t1==t2;}template bool IsEqual(char *str1, char *str2){ cout"\n-----s原创 2015-11-04 21:18:58 · 255 阅读 · 0 评论 -
仿函数
#include #include #include using namespace std;template class T>class display{public:// display(int num):number(num){} void operator ()(const T &t){coutprivate: in原创 2015-11-04 21:22:23 · 247 阅读 · 0 评论 -
auto_ptr
#include #include //using namespace std;int main(){ auto_ptrstring> ps(new string("jjhou")); cout *ps cout ps->size() cout "Hello World!" endl; return 0;}原创 2015-11-04 21:23:58 · 240 阅读 · 0 评论 -
Qt辅助调试release版本代码的函数Msg()
由于对于release版本来说,没法在控制台输出信息。弹窗输出就会方便很多。#include #include #include #include //templatevoid Msg(QString Qstr){#ifdef MSG_DEBUG QMessageBox Qmsg; Qmsg.setText(Qstr); Qms原创 2015-11-04 21:35:37 · 412 阅读 · 0 评论 -
Qt创建不重复随机数
该代码创建一个随机数的类。构造函数有两个:(1)参数为一个整形数,如传入300,则产生0~299的随机数,其中随机数不重复。(2)参数为Qlist,根据这个list直接初始化。//头文件#ifndef RAND_NUM#define RAND_NUM#include class RandNum{ public: RandNum(i原创 2015-11-04 21:31:14 · 4930 阅读 · 0 评论