上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 32 下一页
摘要: Error HandlingSTL设计的目标是性能最优化,而不是最安全。错误检查是极其浪费时间的,因此,STL对于错误处理几乎没有做处理,因此,这对STL的使用者的要求就非常高。为什么不采取错误处理呢,下面是两个主要原因:Error checking reduces performance, and... 阅读全文
posted @ 2014-09-23 21:17 wiessharling 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 概述栈(statck)这种数据结构在计算机中是相当出名的。栈中的数据是先进后出的(First In Last Out, FILO)。栈只有一个出口,允许新增元素(只能在栈顶上增加)、移出元素(只能移出栈顶元素)、取得栈顶元素等操作。在STL中,栈是以别的容器作为底部结构,再将接口改变,使之符合栈的特... 阅读全文
posted @ 2014-09-23 15:11 wiessharling 阅读(198) 评论(0) 推荐(0) 编辑
摘要: deque双向队列是一种双向开口的连续线性空间,可以高效的在头尾两端插入和删除元素,提供随机访问,deque在接口上和vector非常相似,下面列出deque的常用成员函数:Table6.9. Constructors and Destructor of DequesOperation Effect... 阅读全文
posted @ 2014-09-23 11:23 wiessharling 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 一、set在了解关联容器set之前,让我们先来看看下面这个例子,并猜测该例子输出什么:// stl/set1.cpp #include #include int main() { //type of the collection typedef std::... 阅读全文
posted @ 2014-09-23 10:07 wiessharling 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 网易1、对于一个内存地址是32位、内存页是8KB的系统。0X0005F123这个地址的页号与页内偏移分别是多少。2、如果X大于0并小于65536,用移位法计算X乘以255的值为:3、一个包含n个节点的四叉树,每个节点都有四个指向孩子节点的指针,这4n个指针中有多少个空指针?5、计算机在内存中存储数据... 阅读全文
posted @ 2014-09-22 23:44 wiessharling 阅读(437) 评论(0) 推荐(0) 编辑
摘要: What's auto_ptr? The auto_ptr type is provided by the C++ standard library as a kind of a smart pointer that helps to avoid resource leaks when excep... 阅读全文
posted @ 2014-09-16 22:21 wiessharling 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 什么是Pair 关于类Pair的介绍,下面是引自《C++ Standard Library》的一段话: The class pair is provided to treat two values as a single unit. It is used in several places wi... 阅读全文
posted @ 2014-09-16 21:03 wiessharling 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 今天在《C++ Standard Library》中看到explicit 的作用,在这里做一下笔记,以备下次再次忘记该关键字的作用。 By using the keyword explicit, you can prohibit a single argument constructor from... 阅读全文
posted @ 2014-09-16 20:30 wiessharling 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 由于这个开源项目对我这种中间件菜鸟很有帮助,因此,我将官方的说明文档翻译如下:Introduction In this article, I will introduce a new and independentOpen Source Message Queue systemthat is en... 阅读全文
posted @ 2014-09-16 11:22 wiessharling 阅读(961) 评论(0) 推荐(0) 编辑
摘要: 最近实验室里接管了一台服务器,经常需要用到服务器与自己主机之间进行文件传输,因此,在此介绍一下两台Linux主机之间的一些操作,方便后来者。1. Linux、Windows主机远程访问Linux服务器: 在服务器上安装vnc server,在客户端机安装vnc viewer,然后参照一些教程做就可... 阅读全文
posted @ 2014-09-16 08:54 wiessharling 阅读(572) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 32 下一页