These are two different concepts, you cannot compare them. What the difference between the skunk and the moonlight?

Null pointer is a special reserved value of a pointer. A pointer of any type has such a reserved value. Formally, each specific pointer type (int *, char * etc.) has its own dedicated null-pointer value. Conceptually, when a pointer has that null value it is not pointing anywhere.

Void pointer is a specific pointer type - void * - a pointer that points to some data location in storage, which doesn't have any specific type.

So, once again, null pointer is a value, while void pointer is a type. These concepts are totally different and non-comparable.

differences between null pointer and void pointer.的更多相关文章

  1. Pointer arithmetic for void pointer in C

    http://stackoverflow.com/questions/3523145/pointer-arithmetic-for-void-pointer-in-c When a pointer t ...

  2. delete void pointer

    delete void pointer是否会有内存泄漏? 看下面一个简单例子 class Test{ public: Test(){ printf ("constructor\n" ...

  3. Heka 编译安装后 运行报错 panic: runtime error: cgo argument has Go pointer to Go pointer

    Heka 编译安装后 运行报错 panic: runtime error: cgo argument has Go pointer to Go pointer 解决办法: 1.  Start heka ...

  4. 野指针、NULL指针和void*

    一.野指针 “野指针”不是NULL指针,是指向“垃圾”内存的指针. “野指针”的成因主要有三种: (1)指针变量没有被初始化.任何指针变量刚被创建时不会自动成为NULL指针,它的缺省值是随机的,它会乱 ...

  5. 栈帧示意图:stack pointer、frame pointer

    更多参考:http://www.embeddedrelated.com/usenet/embedded/show/31646-1.php 一: The calling convention descr ...

  6. Void pointers in C

    In this article we are learning about “void pointers” in C language. Before going further it will be ...

  7. (原) c++ 杂

    Declaration of variables   C++ is a strongly-typed language, and requires every variable to be decla ...

  8. (转) Pointers

    原地址 http://www.cplusplus.com/doc/tutorial/pointers/ Pointers In earlier chapters, variables have bee ...

  9. Type system

    Type system[edit] Main articles: Data type, Type system, and Type safety A type system defines how a ...

随机推荐

  1. SQL中判断字符串中包含字符的方法

    通过2个函数CHARINDEX和PATINDEX以及通配符的灵活使用 函数:CHARINDEX和PATINDEX CHARINDEX:查某字符(串)是否包含在其他字符串中,返回字符串中指定表达式的起始 ...

  2. fpSpread 设置Border 样式

    // Create a new bevel border. //FarPoint.Win.BevelBorder bevelbrdr = new FarPoint.Win.BevelBorder(Fa ...

  3. Hibernate5--课程笔记1

    Hibernate简介: Hibernate是一个开放源代码的ORM(对象关系映射)框架,它对JDBC进行了非常轻量级的对象封装,使得Java程序员可以随心所欲的使用对象编程思维来操纵数据库. Hib ...

  4. 使用Pycharm 安装三方库

    除了使用easy_insatll和pip工具安装Python第三方库外还可以使用pycharm安装Python第三方库,步骤如下: 1.打开pycharm,点击File,再点击settings 2.点 ...

  5. js-数组算法收集版(转)

    不管是在面试中还是在笔试中,我们都会被经常问到关于javascript数组的一些算法,比方说数组去重.数组求交集.数组扰乱等等.今天抽点时间把javascript中的一些常用的数组算法做一下总结,以方 ...

  6. Java 泛型 协变性、逆变性

    Java 泛型 协变性.逆变性 @author ixenos 摘要:协变性.协变通配符.协变数组.协变返回值 协变性.逆变性和无关性 在面向对象的计算机程序语言中,经常涉及到类型之间的转换,例如从具体 ...

  7. 自己造容器List

    //自己造容器--List /* 1.iterator 2.头迭代器 3.尾迭代器 4.链表长 5.判空 6.清除 7.取头元素 8.取尾元素 9.头插入 10.尾插入 11.头删除 12.尾删除 1 ...

  8. Dubbo协议与连接控制

    协议参考手册 (+) (#) 推荐使用Dubbo协议 性能测试报告各协议的性能情况,请参见:性能测试报告 (+) dubbo:// (+) (#) Dubbo缺省协议采用单一长连接和NIO异步通讯,适 ...

  9. 转Rollback后undo到底做了些什么?

    转自:http://biancheng.dnbcw.info/oracle/309191.html Rollback后undo到底做了些什么? 从概念上讲,undo正好与redo相对.当你对数据执行修 ...

  10. LeetCode OJ 41. First Missing Positive

    Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0]  ...