C++
文章平均质量分 77
zhang_int_int
这个作者很懒,什么都没留下…
展开
-
LRU算法实现
LRU C++ 算法#ifndef _LRU_H#define _LRU_H#include <unordered_map>#include namespace tools {template <class KEY, class VALUE>class Lru{public:class Node{public:Node(const KEY&...原创 2020-03-01 23:39:16 · 183 阅读 · 0 评论 -
模板类多线程(可直接使用)
static void* run(void* arg){ testclassB* res;while (1){res = cthreadpool::getinstance()->get_workres(0);if (res != NULL){res->get_res();dealnum++;res->get_res();delete原创 2014-11-11 22:12:18 · 1132 阅读 · 0 评论 -
自写简化版std::string
题记初略一算,学习C++也有那么久了,平时也写代码。但时常会因为一些基础的问题困惑,于是百度,google等。于是决定,详细的学习C++,梳理。以下为C++的std::string 简化版,功能很简单。参考:C++ primer 第三版注意点:1、在operator =(string& str), 不需要判断str是否为空。但是需要判断str是否和当前str相等。2、返原创 2014-11-30 21:55:28 · 546 阅读 · 0 评论