假设有以下字符串:
string str="123 45 56 89";
现把其中连在一起的数字以整型格式单独取出来(int a=123,int b=45),有没有什么好方案?
假设有以下字符串:
string str="123 45 56 89";
现把其中连在一起的数字以整型格式单独取出来(int a=123,int b=45),有没有什么好方案?
2 回答4.9k 阅读✓ 已解决
3 回答1k 阅读✓ 已解决
1 回答2.8k 阅读✓ 已解决
1 回答932 阅读✓ 已解决
1 回答717 阅读✓ 已解决
1 回答728 阅读✓ 已解决
4 回答696 阅读
http://www.cplusplus.com/reference/cstdio/sscanf/