« first day    last day (22 days later) » 

8:17 AM
-3
A: functor with overloaded () operator in map - only evaluate on demand

CantChooseUsernamesYou're using your class wrong.. You're actually calling the operator() on the same line as the declaration.. To fix it you can do: #include <iostream> #include <string> #include <map> using namespace std; class functor { public: void operator()(int i) { cout << i

This is another case that the answer got three downvotes and only one person raised an issue with it.
 

« first day    last day (22 days later) »