有没有字符串数组C++
时间: 2023-09-13 15:08:49 浏览: 111
C++ 字符串
有,C语言中可以通过定义一个字符数组来表示字符串数组。例如,可以使用以下方式定义一个包含3个字符串元素的字符串数组:C风格字符串数组初始化 string array={"li","zhang","wang"}。这样定义的字符串数组可以通过数组下标来访问和操作每个字符串元素。在C语言中,字符串实际上是使用null字符 '\0' 终止的一维字符数组,所以一个以null结尾的字符数组可以被看作是一个字符串。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [c++之字符串](https://blog.csdn.net/x85371169/article/details/79292030)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [C++字符串数组 | 字符串数组输出](https://blog.csdn.net/weixin_48669767/article/details/111086036)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文