OK, so it looks like you've taken the code from main() and are trying to use it as a class definition.
This won't work; you need to write function code in functions, not in class definitions.
One way if the code must go in a class definition is to have a member function that contains the code from main; that should work OK.
class test {
  void func() {
    TClassA objA;
    TClassB objB;
    TSpecificFunctor<TClassA> specFuncA(&objA, &TClassA::Display);