I'm trying to use a function in a class that accepts a function pointer to any function of any class that is included in my file. Here is my attempt using a variadic template:
In Object.cpp:
#include "aClass.h"
template <class C, typename T0, typename... T> unsigned char* Object::myFunction(T0 (C::*inputFunc)(T... argList)) {
//function body
return anUnsignedCharPtr;}
In main.cpp:
#include "Object.h"
Object someObject = Object();
void (aClass::*inputFunc)(int);
inputFunc = &(aClass::aFunction);
unsigned char* anUnsignedCharPtr = someObject.myFunction(inputFunc);
When I try to compile with MVS 2013 I get the following error: "error LNK2019: unresolved external symbol...". What am I doing wrong?