码迷,mamicode.com
首页 >  
搜索关键字:pointer    ( 2176个结果
寄存器的英文全称 转载
一、寄存器的英文全称AH&AL=AX(accumulator):累加寄存器 BH&BL=BX(base):基址寄存器 CH&CL=CX(count):计数寄存器 DH&DL=DX(data):数据寄存器 SP(Stack Pointer):堆栈指针寄存器 BP(Base Pointer):基址指针寄...
分类:其他好文   时间:2014-05-28 19:09:52    阅读次数:300
STL之heap
STL的堆操作STL里面的堆操作一般用到的只有4个:make_heap();、pop_heap();、push_heap();、sort_heap();他们的头文件函数是#include 首先是make_heap();他的函数原型是:void make_heap(first_pointer,end_...
分类:其他好文   时间:2014-05-28 02:15:50    阅读次数:291
【LeetCode】Implement strStr()
Implement strStr()Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack.标准KMP算法。...
分类:其他好文   时间:2014-05-27 23:41:07    阅读次数:366
【C++深入浅出】智能指针之auto_ptr学习
起:C++98标准加入auto_ptr,即智能指针,C++11加入shared_ptr和weak_ptr两种智能指针,先从auto_ptr的定义学习一下auto_ptr的用法。template class auto_ptr { // wrap an object pointer to ensure....
分类:编程语言   时间:2014-05-27 16:13:40    阅读次数:440
[leetcode]Copy List with Random Pointer @ Python
原题地址:https://oj.leetcode.com/problems/copy-list-with-random-pointer/题意:A linked list is given such that each node contains an additional random pointe...
分类:编程语言   时间:2014-05-26 23:16:12    阅读次数:368
const char*、char*、char* const、char[]、string的区别
1、const char* p: p is a pointer to const char(char const* p 一样) 意思就是不能通过p指针来修改p指向的内容(但是内容可以修改)。2、char* p : p is a pointer to char 意思就是可通过p指针来修改p指向的内容3...
分类:其他好文   时间:2014-05-26 17:30:58    阅读次数:153
OpenCV源码之内存分配-指针对齐
首先,为什么要指针对齐(Pointer Alignment)? 指针对齐有时候非常重要,因为许多硬件相关的东西在对齐上存在限制。在有些系统中,某种数据类型只能存储在偶数边界的地址处。 例如,在经典的 SPARC架构(以及经典的ARM)上,你不能从奇数地址读取一个超过1字节的整型数据。尝试这么做将会立即终止程序,并伴随着总线错误。而在X86架构上,CPU硬件处理了这个问题,只是这么做将会花费更多...
分类:其他好文   时间:2014-05-25 18:12:37    阅读次数:917
the leak of the memory in c++ 03
The Leak of the Memory in C++     In this chaper I will introduce a new smart pointer which is scoped_ptr; It likes auto_ptr but better. When peopel use auto_ptr, sometimes they forget that auto_...
分类:编程语言   时间:2014-05-25 07:03:10    阅读次数:373
go中string和slice no-copy转换
在go里面,string和slice的互换是需要进行内存拷贝的,虽然在底层,它们都只是用 pointer + len来表示的一段内存。通常,我们不会在意string和slice的转换带来的内存拷贝性能问题,但是总有些地方需要关注的,刚好在看vitess代码的时候,发现了一种很hack的做法,stri...
分类:其他好文   时间:2014-05-21 19:53:21    阅读次数:223
UVA 12123 - Magnetic Train Tracks(计数问题)
题目链接:12123 - Magnetic Train Tracks 题意:给定n个点,求有几个锐角三角形。 思路:和UVA 11529是同类的题,枚举一个做原点,然后剩下点根据这个原点进行极角排序,然后利用two pointer去遍历一遍,找出角度小于90度的锐角,然后扣掉这些得到钝角三角形的个数,然后在用总情况去扣掉钝角就是锐角或直角 代码: #include #include #...
分类:Web程序   时间:2014-05-20 14:10:56    阅读次数:412
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!