Hi, thanks for replying, I'm doing this simply for practise, I'd rather not use <functional>. And plus it needs to be able to support ANY time of data, not just int and strings.
All I need to do is simply make a local variable declared inside a class member function accessible to the entire class without declaring it in the class itself.
Hi, thanks for replying, I'm doing this simply for practise, I'd rather not use <functional>. And plus it needs to be able to support ANY time of data, not just int and strings.
Then don't use functional. But, seeing how it works may help you figure out how you want yours to work. It does support ANY kind of data. It supports any functor/function/lambda with the right prototype, and those may deal with any kind of data they desire.
The problem is, the class doesn't yet know the type of CallbackFunction <SomeType> so I cannot declare it in the class, I need to declare it in the template function, and then make it a class member from there.