アプリケーションに実装したいステップのこのサンプル プログラムがあります。文字列の int 要素を個別にベクトルに push_back したい。どうやって?
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int main(){
string line = "1 2 3 4 5"; //includes spaces
stringstream lineStream(line);
vector<int> numbers; // how do I push_back the numbers (separately) here?
// in this example I know the size of my string but in my application I won't
}