pointer: address, use operator(*) to get/set the value

    1) support operator(+,-), move to next positon accroding to the element type it points to

    2) only should be used when mem is successive

iterator: class template, an iterator is an object of class Iter<element>

    1) we can't asign an element to it directly

    2) it stores a pointer of the elements it points to.

    3) support operator(+,-), which will change the pointer value of the element it points to, return a reference of it's self (Iter)

    4) and we can use operator(*) to get/set the value of the elements

pointer & iterator的更多相关文章

  1. 模板化的七种排序算法,适用于T* vector<T>以及list<T>

    最近在写一些数据结构以及算法相关的代码,比如常用排序算法以及具有启发能力的智能算法.为了能够让写下的代码下次还能够被复用,直接将代码编写成类模板成员函数的方式,之所以没有将这种方式改成更方便的函数模板 ...

  2. [转]SGI STL 红黑树(Red-Black Tree)源代码分析

    STL提供了许多好用的数据结构与算法,使我们不必为做许许多多的重复劳动.STL里实现了一个树结构-Red-Black Tree,它也是STL里唯一实现的一个树状数据结构,并且它是map, multim ...

  3. 带你深入理解STL之RBTree

    最近一直忙于校招的笔试,STL的深入理解系列也耽搁了好几天,再加上!红黑树真的是超级超级难理解,超级超级复杂,参考了好多博客上的大神的理解才稍微明白一点,勉强入个门,下面请以一个菜鸟的角度跟着我一起学 ...

  4. 带你深入理解STL之Stack和Queue

    上一篇博客,带你深入理解STL之Deque容器中详细介绍了deque容器的源码实现方式.结合前面介绍的两个容器vector和list,在使用的过程中,我们确实要知道在什么情况下需要选择恰当的容器来满足 ...

  5. stl源码剖析 详细学习笔记 RB_tree (1)

    // //  RB_tree_STL.cpp //  笔记 // //  Created by fam on 15/3/21. // // #include "RB_tree_STL.h&q ...

  6. C++ Core Guidelines

    C++ Core Guidelines September 9, 2015 Editors: Bjarne Stroustrup Herb Sutter This document is a very ...

  7. STL标准库-容器-rb_tree

    技术在于交流.沟通,本文为博主原创文章转载请注明出处并保持作品的完整性 红黑树,关联式容器底层实现(map set),在使用中基本运用不到,但是还是想了解一下他的运作方式 Red_Black tree ...

  8. STL源码剖析(set/map)

    SGI STL中set/map底层都是通过RB-tree实现的. 首先看看RB-tree结点的定义 typedef bool __rb_tree_color_type; const __rb_tree ...

  9. stl_hash_set.h

    stl_hash_set.h // Filename: stl_hash_set.h // Comment By: 凝霜 // E-mail: mdl2009@vip.qq.com // Blog: ...

随机推荐

  1. 伯克利SocketAPI(一) socket的C语言接口/最简单的服务器和对应的客户端C语言实现

    1. 头文件 2. API函数 3. 最简单的服务器和对应的客户端C语言实现 3.1 server #include <sys/types.h> #include <sys/sock ...

  2. Doker安装日志,留个记录而已

    tianye@ubuntu:/usr/share$ wget -qO- https://get.docker.com/ | sh # Executing docker install script, ...

  3. 'webpack'提示 不是内部或外部命令

    使用webpack命令行,报错:'webpack' 不是内部或外部命令,也不是可运行的程序 或批处理文件. 解决办法: 卸载nodejs,按照默认设置从新安装一遍 Nodejs 转载:https:// ...

  4. UE4 二维相关

    SceneCapture2D  (类似相机组件)可将视口内的图像转化为平面二维纹理资源渲染到 RenderTargetRenderTarget 可以被 Material直接使用例:做小地图SceneC ...

  5. TensorFlow从入门到理解(五):你的第一个循环神经网络RNN(回归例子)

    运行代码: import tensorflow as tf import numpy as np import matplotlib.pyplot as plt BATCH_START = 0 TIM ...

  6. python 之模块random

    随机形成字母和数字组成的五位字符码. [root@localhost python]# vim timee.py import random def coder(): code = '' for i ...

  7. 前端分辨pc和移动端导入不同css

    通过navigator获取浏览器,根据浏览器的不同判断出pc和移动端然后设置不同的css 分辨不同屏幕导入不同的css文件: function loadCSS() { if((navigator.us ...

  8. producer发布消息

    1.写入方式 producer采用push模式将消息发布到broker,每条消息都被append到patition中,属于顺序写磁盘(顺序写磁盘效率比随机写内存要高,保障kafka吞吐率) 2.消息路 ...

  9. Java基础_0308:String类的常用方法

    取出指定索引的字符 -- 使用charAt()方法 public class StringDemo { public static void main(String args[]) { String ...

  10. CSS-联合选择器

    深层布局,逐级进去,指向某一个标签,叫:关联选择器 - 设置嵌套标签的样式 div p {} day02 昨天内容回顾 1.html的操作思想 ** 使用标签把要操作的数据包起来,通过修改标签的属性值 ...