さて、文字列 s =" 1 2 3" がある場合、それを読みました
我々はできる :
istringstream iss(s);
int a;
int b;
int c;
iss >> a >> b >> c;
次のようなテキスト ファイルがあるとします。
テスト
1 100 ミリ秒
テスト
2 200 ミリ秒
テスト
3 300 ミリ秒
ifstream in ("test.txt")
string s;
while (getline(in, s))
{
// I want to store the integers only to a b and c, How ?
}