C++ 之 C style string

1. 字符串字面值的类型是字符常量数组。(const char[])

2.  C style string:应null字符null结束的字符数组。

     eg. char cha3[] = "Hello world"; // null terminator added automatically

           char *chp = "Hello"; // null terminator added automatically

3. C++ 通过(const)char *类型来操纵C风格字符串。

posted on 2011-07-11 12:42  xiaoxxy  阅读(245)  评论(0编辑  收藏  举报

导航