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. ExceptionDemo

    功能: 利用struts.xml 捕获异常  不满足这三个值就报异常 1.web.xml <?xml version="1.0" encoding="UTF-8&q ...

  2. 安装Postgresql踩过的坑

    PG安装相关的 1  系统语言的设置 PG的安装,和系统的locale设置有一定的关系,需要设置,如在.profile或.bashrc中 也可以运行下面的命令: dpkg-reconfigure lo ...

  3. docker安装升级linux内核(2.6.32->3.12.17)

    1.内核升级环境准备 #查看已经安装的和未安装的软件包组,来判断我们是否安装了相应的开发环境和开发库:yum grouplist#一般是安装这两个软件包组,这样做会确定你拥有编译时所需的一切工具yum ...

  4. 第一百一十三节,JavaScript文档对象,DOM基础

    JavaScript文档对象,DOM基础 学习要点: 1.DOM介绍 2.查找元素 3.DOM节点 4.节点操作 DOM(Document Object Model)即文档对象模型,针对HTML和XM ...

  5. js--3目运算符

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name ...

  6. [妙味DOM]第四课:Event-事件详解2

    知识点总结 事件捕获 obj.addEventListener('click',fn,true) 从外往里 obj.addEventListener('click',fn,false) 从里往外(冒泡 ...

  7. 关于ApkTool不同版本在重新打游戏包时候的区别

    在工作中由于使用到将游戏CP提供的apk包重新反编译,然后二次签名出包,所以遇到了一个奇怪的bug. 下面是CP提供的apk包,将近358M 但是在重新编译之后,包变成了250M左右的apk包,虽然可 ...

  8. HTML通过事件传递参数到js 二 event

    原文链接http://blog.sina.com.cn/s/blog_8a18c33d010172pp.html event用例: <!DOCTYPE html><html>& ...

  9. POJ 3259 Wormholes(SPFA+邻接表)

    ( ̄▽ ̄)" #include<iostream> #include<cstdio> #include<queue> #include<vector ...

  10. Chapter 15_4 子模块和包

    Lua支持具有层级性的模块名,可以用一个点来分隔名称中的层级. 比如,一个mod.sub模块,它就是mod的子模块.一个包(package)就是一个完整的模块树. 当你require "mo ...