Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Then, in main we can use std::transform to do most of the real work. The main difficulty here is that we need to read the input line-by-line, but transform uses iterators which (as shown in reverse_line) normally read word-by-word. There are a number of ways to deal with that, many of which are outlined in answers to an old SO question old SO question.

Then, in main we can use std::transform to do most of the real work. The main difficulty here is that we need to read the input line-by-line, but transform uses iterators which (as shown in reverse_line) normally read word-by-word. There are a number of ways to deal with that, many of which are outlined in answers to an old SO question.

Then, in main we can use std::transform to do most of the real work. The main difficulty here is that we need to read the input line-by-line, but transform uses iterators which (as shown in reverse_line) normally read word-by-word. There are a number of ways to deal with that, many of which are outlined in answers to an old SO question.

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

Note that this appends an extra space at the end of each line. I'd guess that's allowed, but if not you can use an infix_ostream_iterator infix_ostream_iterator in place of the ostream_iterator above.

Note that this appends an extra space at the end of each line. I'd guess that's allowed, but if not you can use an infix_ostream_iterator in place of the ostream_iterator above.

Note that this appends an extra space at the end of each line. I'd guess that's allowed, but if not you can use an infix_ostream_iterator in place of the ostream_iterator above.

deleted 6 characters in body
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

Then, in main we can use std::transform to do most of the real work. The The main difficulty here is that we need to read the input line-by-line, but transform uses iterators which (as shown in reverse_line) normally read word-by-word. There are a number of ways to deal with that, many of which are outlined in answers to an old SO question.

Then, in main we can use std::transform to do most of the real work. The The main difficulty here is that we need to read the input line-by-line, but transform uses iterators which (as shown in reverse_line) normally read word-by-word. There are a number of ways to deal with that, many of which are outlined in answers to an old SO question.

Then, in main we can use std::transform to do most of the real work. The main difficulty here is that we need to read the input line-by-line, but transform uses iterators which (as shown in reverse_line) normally read word-by-word. There are a number of ways to deal with that, many of which are outlined in answers to an old SO question.

edited body
Source Link
Jerry Coffin
  • 34.1k
  • 4
  • 77
  • 144
Loading
Source Link
Jerry Coffin
  • 34.1k
  • 4
  • 77
  • 144
Loading
lang-cpp

AltStyle によって変換されたページ (->オリジナル) /