[C++ VC MFC] char* str="heelo"与char str[]="heelo"区别
2008-01-13 21:15
429 查看
前者是指针,指向一个常量字符串的指针
后者是一个数组.... 大家都是在栈中分配空间
其实区别更在于,后者会有复制字符串的开销
后者是一个数组.... 大家都是在栈中分配空间
其实区别更在于,后者会有复制字符串的开销
相关文章推荐
- 面试题--字符串指针与字符串数组的区别char* st="abc;与char* str[]="abc";的异同
- char str[] = "hello world";和char *str = "hello world";区别
- char str[] = "hello world";和char *str = "hello world";区别
- C/C++/VC MFC----char & int---study
- C/C++语言中,#include <>和#include ""的区别
- c/c++中#include <>与#include""区别
- 关于str="" 和 str=null;的区别
- VC|MFC内存不能为"read"+仅通过崩溃地址找出源代码的出错行
- 关于char * c="hello"与char c[]="hello"的区别(面试宝典)
- char * str="hello"
- String str 与 String str=new String("") 区别
- String str = "hello"; 与 String str = new String("hello"); 有什么区别?
- VC中_T("")与L区别
- 函数参数为 "char* p" 与 "char*& p" 的区别
- str.split(&amp;amp;amp;quot;&amp;amp;amp;quot;)在JDK1.7和JDK1.8中的区别
- String str = new String("abc")和String str = "abc"区别
- char *Str;Str="abcdef";和char Str[]="abcdef";有什么区别??
- c/c++中#include <>与#include""区别
- VC中L""和_T("")的区别
- String str=null; 和String str=""有什么区别