任意输入一个数字字符串(9字以内),将其转换成整数(c++)

百度了一下

听说stringstream超好用
库定义了三种类:istringstream、ostringstream和stringstream,分别用来进行流的输入、输出和输入输出操作。
在这里插入图片描述
可以了
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_44769592/article/details/91054839