Lecture overview -- Keyboard shortcut: 'u'  Previous page: Use of function objects in STL -- Keyboard shortcut: 'p'    Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 5 - Page 39 : 39
Notes about C++
Templates and The Standard Library
Adapter examples

We show a couple of example of Adapters

Adaption of an operator (+) and adaptation of a member function (print in Point)

y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/algorithms/adapters/plus-example/plus-1.cppAn illustration of plus<double>.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/algorithms/adapters/plus-example/plus-3.cppA possible definition of plus.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/algorithms/adapters/plus-example/plus-4.cppAnother definition of plus - as a function template.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/algorithms/adapters/member-adapter/memb-adapt-1.cppUse of member function adaption, with mem_fun_ref.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/algorithms/adapters/member-adapter/point.hThe definition of Point - point.h.