I want to make a program that will read some number in string format and output it like this: if the number is 12345 it should then output 12 23 34 45 . I tried using the su
Possible solution with string_view
void do_it_with_string_view( void ) { std::string a { "12345" }; for ( std::string_view v { a }; v.size() - 1; v.remove_prefix( 1 ) ) std::cout << v.substr( 0, 2 ) << " "; std::cout << std::endl; }