C++ suggest change

std::function

Basic of std::function:

#include <iostream>
#include <functional>

std::function<void(int , const std::string&)> myFuncObj;

void theFunc(int i, const std::string& s)
{
    std::cout << s << ": " << i << std::endl;
}

int main(int argc, char *argv[])
{
    myFuncObj = theFunc;
    myFuncObj(10, "hello world");
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Table Of Contents
34 std::function
63 RAII
85 RTTI
  ↑ ↓ to navigate     ↵ to select     Esc to close