const TYPE *pPointer、TYPE * cosnt pPointer使用举例
来源:互联网 发布:e海通财交易软件 编辑:程序博客网 时间:2024/06/02 09:23
char szSource[100];
memset(szSource,0,100);
memset(szSource,'a',90);
char szDest[100];
const char *pContent1;// 指针内容为常量,内容不可变
pContent1 = szDest;
char* const pContent2 = szSource; // 指针为常量,不可变。其类型仍然为char*指针类型,该指针被const修饰为常量,必需初始化
char* pContent3; //普通无修饰指针类型变量
const char* pContent4;
//char* const pContent5 = pContent1; // error C2440: '=' : cannot convert from 'const char *' to 'char *'
//pContent3 = pContent1; // error C2440: '=' : cannot convert from 'const char *' to 'char *'
pContent3 = pContent2; // 正确
pContent4 = pContent1; // 正确
pContent4 = pContent2; // 正确
pContent4 = pContent3; // 正确
- const TYPE *pPointer、TYPE * cosnt pPointer使用举例
- 正解PPointer,Pointer
- const type&的使用注意
- const type *var, type const * var, type *const var 和 const type *const var
- cosnt、const函数、const变量
- type
- type
- TYPE
- Type
- type()
- const type *name 和type const *name 的区别
- const vector<Type>和vector<const Type>的区别
- NSValue的使用...@encode(type)...int strcmp(const char *, const char *); 返回 0 表示相等
- 不能将this指针从“const type" 转换为"type &"
- %TYPE的使用
- Sysobjects Type使用参数
- trigger(type,[data])使用
- 怎么使用Type类?
- build freeradius for ubuntu
- Winsocket编程之套接字原理
- 奇怪的梦
- 英语学习——新婚贺词
- 使用集合
- const TYPE *pPointer、TYPE * cosnt pPointer使用举例
- java图片验证码
- Aix 常用指令
- 中国没有Google,国民将会怎样?
- 争当掏粪工的姑娘
- PCI规范学习笔记(2)
- 怎样实现QT3控件的背景为透明?
- DDE中LinkTopic的设置
- 文件查找(CFileFind)