Learn how binary transformations use a binary operator function that takes two operands. This form operates on two containers.
- [Bill] The transform function has another form…which uses a binary operator, it takes two operands…and allows the results to be sent to a third container.…So, if we look here in our binary-transformation.cpp file,…you'll see down here,…we have our transformation on line 34…and you'll notice that this has five operands,…instead of four, the first being the beginning iterator…for one of the sources.…Second, being the end iterator for one of the sources.…
The third, being the beginning iterator…for the second source.…So, you've got two sources here around a binary operator,…and the third being the beginning iterator…for the destination,…and then the fifth operand is our operator,…and in this case, we have a binary operator,…and if you look here at our class embiggen,…the operator takes two operands.…So, the function called operator for the functor…takes two operands, and it'll take these two operands,…and it will multiply them and accumulate the results.…
And so, it's very much like our acccumulator,…except this one uses multiplication instead of addition.…
- Template fundamentals
- STL containers
- Accessing iterators
- Output, forward, and bidirectional iterators
- The transform function
- Transforming strings and types
- Arithmetic, relational, and logical functions
- STL algorithms
Skill Level Intermediate
2. STL Containers
3. STL Iterators
5. STL Functions
6. STL Algorithm
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.