1. Functor là gì? Nếu như là một fan trung thành của C++ STL (Standard Template Library), bạn sẽ bắt gặp functor rất nhiều. Ví dụ trong đoạn code sau: #include <iostream> #include <vector> #include <algorithm> void increment(int& i) { ++i; std::cout << i << ' '; } int main() { std::vector<int> v […]
Read More
Manh
March 11, 2016
C++