Chinaunix首页 | 论坛 | 博客
  • 博客访问: 16183
  • 博文数量: 14
  • 博客积分: 245
  • 博客等级: 二等列兵
  • 技术积分: 180
  • 用 户 组: 普通用户
  • 注册时间: 2012-12-28 13:45
文章分类

全部博文(14)

文章存档

2013年(9)

2012年(5)

我的朋友

分类: C/C++

2013-01-15 18:57:06

#include "stdafx.h"
#include
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
 char a[] = "hello";
 a[0] = 'X';
 cout<

 

 char *p ="world";
 p[0] = 'x';
 cout<

 return 0;
}

 

第二条时,"world"是在常量存储区中的,属于不能修改的内容,但是编译器又无法判断它。

阅读(330) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~