SO中文参考
首页
(current)
程序语言
c
java
python
c++
go
javascript
swift
c#
操作系统
linux
ubuntu
centos
unix
数据库
oracle
mysql
mongodb
postgresql
框架
node.js
angular
react-native
avalon
django
twisted
hadoop
.net
移动开发
android
ios
搜索
我使用scanf()将输入作为字符串,但是使用cout输出。为什么我的程序终止?
问题描述
投票:-1
回答:1
我使用scanf()将输入作为字符串,但是使用cout输出。为什么我的程序在不显示输出的情况下终止?
string s; scanf("%s",&s); cout <<s<<endl;
string
scanf
1个回答
0
投票
scanf
使用c字符串(字符数组)。请改用
getline
。
最新问题
将 pandas 数据框写入 Excel 消耗太多内存
返回用户自定义函数的问题(从头学R)
Typescript 在其他文件中导入接口会抛出错误
从初始化程序中非法引用静态字段
如何正确修改android x86 system.img(2023)?
根据条件进行不同计数
Expo CameraView 无法扫描条形码
调试时如何将 Visual Studio HTTPS 服务器放入托盘图标
以编程方式刷新系统托盘图标
如何使用Python删除csv文件中逗号前后的空格?
使用 8051 的高温警报
此处应用的确切编译器优化(除了尾递归消除之外)是什么?
带有添加按钮的TabControl
sink writer在成功1-3次后总是停止或出错?
使用四边形提高积分精度
在 React Native 中创建白色文本轮廓
在WAMP中更改localhost/phpMyadmin的浏览器
使用区域和控制器名称进行路由(asp.net core)
在 github actions yml 文件中创建 Minio(S3) 容器
更新语句因 ORA-01427 失败 - 已更新
© www.soinside.com 2019 - 2024. All rights reserved.