visual studio字符串输入
时间: 2023-08-28 14:07:41 浏览: 175
在Visual Studio开发环境下,可以使用`gets`函数或`scanf`函数来实现字符串的输入。在引用的示例代码中,使用了`gets`函数来获取用户输入的字符串。`gets`函数可以接收用户在控制台输入的字符串,并将其存储在指定的字符数组中。需要注意的是,`gets`函数存在安全性问题,建议使用更安全的替代函数,如`gets_s`或`fgets`函数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [2022-9-2字符串函数](https://blog.csdn.net/PC0monkey/article/details/126670156)[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_2"}}] [.reference_item style="max-width: 50%"]
- *3* [Visual Studio开发环境下C++文件读取,字符串复杂处理源代码](https://download.csdn.net/download/xiangyunguju/87500157)[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_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文