istringstream
文字列を変換。cで言うところのsscanf
例
OBS
22.235
ORI_KL
08_05_19
がbufに入っていたとした時
istringstream is(buf);
is >> command;
is >> freq;
is >> source;
is >> year >> c1 >>month >> c2 >>day;
でそれぞれ数値、文字列に変換されて代入されるらしい。
文字列を変換。cで言うところのsscanf
例
OBS
22.235
ORI_KL
08_05_19
がbufに入っていたとした時
istringstream is(buf);
is >> command;
is >> freq;
is >> source;
is >> year >> c1 >>month >> c2 >>day;
でそれぞれ数値、文字列に変換されて代入されるらしい。