diff --git a/lab04.1/main.cpp b/lab04.1/main.cpp index 7acaf0e..429996d 100644 --- a/lab04.1/main.cpp +++ b/lab04.1/main.cpp @@ -12,7 +12,8 @@ int main() { const char* start = text; - while (true) { + while (true) + { size_t separator_count = strspn(start, SEPARATORS); start += separator_count; @@ -21,6 +22,12 @@ int main() { { break; } + + size_t word_length = strcspn(start, SEPARATORS); + + std::cout.write(start, word_length) << std::endl; + + start += word_length; } return 0;