We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C++
- Strings
- StringStream
- Discussions
StringStream
StringStream
Sort by
recency
|
509 Discussions
|
Please Login in order to post a comment
include
include
include
using namespace std;
vector parseInts(string str) { stringstream ss(str); char ch; int a; vector result; int count = 1; for(int i =0; i < str.length(); i ++) { if (str[i] == ',') { count++; } }
}
include
include
include
include
include
include
using namespace std; int main() {
}
vector parseInts(string str) { vector vec; stringstream ss; ss << str; char ch; int num; while (!ss.eof()){ ss >> num >> ch; vec.push_back(num); } return vec; }
stringstream ss; vector temp; int tempstr; ss << str; char ch; while (!ss.eof()) {
} return temp;