1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <iostream> #include <string> #include <sstream> #include <algorithm> #include <iterator> #include <vector> int main() { std::string s = "What is the right way to split a string into a vector of strings"; std::stringstream ss(s); std::istream_iterator<std::string> begin(ss); std::istream_iterator<std::string> end; std::vector<std::string> vstrings(begin, end); std::copy(vstrings.begin(), vstrings.end(), std::ostream_iterator<std::string>(std::cout, "\n")); return 0; } |
-
upload with new input
-
result: Success time: 0s memory: 3032 kB returned value: 0
544543454355
What is the right way to split a string into a vector of strings
-
result: Success time: 0s memory: 2988 kB returned value: 0
cnzklc lklkxj lkjc akl a
What is the right way to split a string into a vector of strings
-
result: Success time: 0s memory: 3032 kB returned value: 0
What is the right way to split a string into a vector of strings
-
result: Success time: 0s memory: 3032 kB returned value: 0
hg
What is the right way to split a string into a vector of strings
-
result: Success time: 0s memory: 3032 kB returned value: 0
hgjgjklg ikg kl lkh k k hk h k;kj ; jk hkk k h
What is the right way to split a string into a vector of strings
-
result: Success time: 0s memory: 2988 kB returned value: 0
d v s f g
What is the right way to split a string into a vector of strings
-
result: Success time: 0s memory: 2988 kB returned value: 0
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.196163,0.093588,0.000000,0.000000,0.000000,0.000000,0.000000,0.088769,0.243503,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.034764,0.243503,0.025634,0.000000,0.000000
What is the right way to split a string into a vector of strings
-
result: Success time: 0.01s memory: 2820 kB returned value: 0
dfgdfg
What is the right way to split a string into a vector of strings
-
result: Success time: 0.01s memory: 2820 kB returned value: 0
a b
What is the right way to split a string into a vector of strings
-
result: Success time: 0.02s memory: 2820 kB returned value: 0
hello world
What is the right way to split a string into a vector of strings
-
result: Success time: 0.01s memory: 2864 kB returned value: 0
k;ljjk
What is the right way to split a string into a vector of strings
-
result: Success time: 0.01s memory: 2820 kB returned value: 0
asda dam lsd lmaldm amsdm lamdm al;dma; mdl;am
What is the right way to split a string into a vector of strings
-
result: Success time: 0.01s memory: 2820 kB returned value: 0
this is a test.
What is the right way to split a string into a vector of strings
-
result: Success time: 0s memory: 2864 kB returned value: 0
What is the right way to split a string into a vector of strings


