StringStream

  • + 0 comments
    vector<int> parseInts(string str) {
    	// Complete this function
        vector<int> v;
        stringstream ss(str);
        char ch;
        int x;
        while (ss>>x) {
        v.push_back(x);
        ss>>ch;
        }
        return v;
    }