I need to input n number of strings seperated by this simbol | and put them inside of an array**.** E.g. split 0010|1010|1111 to {0010, 1010, 1111} I know the number of "blocks"(strings between the simbol) and the size of each string that is constant. I'm having real trouble finding how to do this online.
Asked
Active
Viewed 87 times
0
-
Hint: use `std::string` and treat it as an array. – Thomas Matthews Jan 02 '20 at 18:44
-
The linked duplicate is completly outdated and should not be used any longer. It is 2020 now. You should use ````std::sregex_token_iterator```` or ````ranges::view::split('|').```` result is always a one-liner. – Armin Montigny Jan 03 '20 at 09:35