Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <vector>
- #include <sstream>
- #include <iterator>
- #include <numeric>
- using namespace std;
- void main()
- {
- string s{"1 2 3"};
- int i = accumulate(istream_iterator<int>{istringstream{s}}, istream_iterator<int>{}, int{});
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement