开发平台(Platform): (Ex: Win10, Linux, ...)
编译器(Ex: GCC, clang, VC++...)+目标环境(跟开发平台不同的话需列出)
额外使用到的函数库(Library Used): (Ex: OpenGL, ...)
问题(Question):
测资长这样 https://imgur.com/LGRfjEa
我是希望直接用输入得到的数字赋值给变量
像是python可以直接写 a, b = map(int, input().split(','))
不知道C++应该怎么做
喂入的资料(Input):
预期的正确结果(Expected Output):
错误结果(Wrong Output):
程式码(Code):(请善用置底文网页, 记得排版,禁止使用图档)
补充说明(Supplement):
作者: hsnuyi (羊咩咩~) 2020-03-12 17:41:00
google C++ string reference 去看看有哪些method可以用C++的I/O是用有点复杂的方式继承的 可以从<string>开始往不同方向看看关联要是往上找 就会看到类似C的东西 往下则是有些方便的东西
作者:
EdisonX (卡卡兽)
2020-03-18 10:16:00int iret =sscanf("%d,%d,%d", &a,&b,&c);打错了 是scanf,不是 sscanf