#include <iostream>
#include <stdlib.h> using namespace std;
class Foo
{
public:
int i;
float f;
char *cp; }; int main()
{
Foo f1;
if(f1.cp == 0) cout <<" in stack,f1.cp is null "<< endl;
cout<< f1.i << " " << f1.f <<" "<<f1.cp << endl; Foo *pf = new Foo();
if(pf->cp == 0) cout <<" in heap,pf.cp is null "<< endl;
cout << pf->i << " " << pf->f << " "<< pf->cp <<endl; return 0;
}

/work/ctest/insideTheC++ObjectModel$ ./1
770374040 4.55997e-41 H�l$�L�d$�H�-
 in heap,pf.cp is null
0 0

最新文章

  1. C#汉字转拼音(支持多音字)
  2. SqlServer删除表中重复记录
  3. [Asp.net]通过uploadify将文件上传到B服务器的共享文件夹中
  4. How to get the Current Controller Name, Action, or ID in ASP.NET MVC
  5. c++ 中 delete p与 delete []p的区别
  6. RedHat6.6更新Centos6yum源
  7. [原创]谷歌插件 - YE搜图助手(YeImageFinder)
  8. SkyEye的使用
  9. IPayablebillItf
  10. 【Java】Java6 WebService的发布
  11. ‘for’ loop initial declarations are only allowed in C99 mode
  12. Oracle修改字段长度以及计算天数
  13. 543. Diameter of Binary Tree
  14. C++求出旋转数组的最小数字
  15. Ubuntu Server无线上网
  16. Linux centos7系统下svn的安装与配置
  17. 利用Eclipse构建SpringMVC项目
  18. 任务型对话(一)—— NLU(意识识别和槽值填充)
  19. 字符编码:Unicode和UTF-8之间的关系
  20. List接口和Set接口和Map接口的of方法

热门文章

  1. Hadoop基础入门
  2. linux下目录、文件显示颜色的设置生效
  3. 转 .net数据类型
  4. 「bzoj1925」「Sdoi2010」地精部落 (计数型dp)
  5. ORACLE--12C--创建PDB
  6. llinux 目录结构 及Linux文件分享
  7. URL篇之不安全字符处理
  8. 关于eclipse添加自动查找文件以及svn的插件
  9. 2018最新mfc作为上位机接收硬件端USB或串口数据显示成图片 解决串口接收数据丢字节丢包问题
  10. Windows x64位通过PEB获得Kernel32基地址