在 VS Code 中使用 cin 输入数据
问题默认在 VS Code 中,我们无法使用 cin 输入数据。
![在 VS Code 中使用 cin 输入数据](https://hot166.com/uploads/images/202412/image_870x_6752e5a2d61b9.jpg)
问题
默认在 VS Code 中,我们无法使用 cin 输入数据。
解决方案
步骤如下:
- 安装
Code Runner
插件 - 按
command + ,
进入设置页面,输入Run in Terminal
- 勾选上
Whether to run code in Integrated Terminal.
如下图所示:
你的反应是什么?
![like](https://hot166.com/assets/img/reactions/like.png)
![dislike](https://hot166.com/assets/img/reactions/dislike.png)
![love](https://hot166.com/assets/img/reactions/love.png)
![funny](https://hot166.com/assets/img/reactions/funny.png)
![angry](https://hot166.com/assets/img/reactions/angry.png)
![sad](https://hot166.com/assets/img/reactions/sad.png)
![wow](https://hot166.com/assets/img/reactions/wow.png)