angelpan1014

 

2012年8月3日

学习中忽略的细节1

摘要: 1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 const char p[]="I!" //没有‘\0’ 6 "I am a girl"; //结束时才有‘\0’7 //const char* p="I"8 "am a girl";9 cout<<sizeof(p)<<endl;10 cout<<p<<endl;11 return 0; 12 }输出结果是:14I!I am a 阅读全文

posted @ 2012-08-03 09:29 angelpan1014 阅读(88) 评论(0) 推荐(0) 编辑

导航