11 lines
311 B
C++
11 lines
311 B
C++
#include <iostream>
|
|
#include <string>
|
|
|
|
int main() {
|
|
std::string t = "A:0.027,0.027,0.027,0.027";
|
|
float v[4] = {0, 0, 0, 0};
|
|
int res = sscanf(t.c_str() + 2, "%f,%f,%f,%f", &v[0], &v[1], &v[2], &v[3]);
|
|
std::cout << "res=" << res << ", v0=" << v[0] << ", v1=" << v[1] << std::endl;
|
|
return 0;
|
|
}
|