I'm just beginning to learn ppl in Visual Studio and I began learning about tasks. So far so good, and for example I do understand the basics. But how can I create task that receives an argument? That is, it is fairly straightforward to create task which takes no arguments, but one that takes any arguments is not obvious to me at all.
Task creation where task does not take any arguments is easy:
task<string> aTask{ create_task([]() {
return string{};
}
)
};
Cannot really pass any arguments to it. How would I go about it. If I try to pass arguments into lambda I'm getting compilation error.