c++ recurisve function with calling a class using a templatefunction : i would like to have a function, that counts a value down to zero. in addition, i would like to call some code which class is passed as a template parameter.
but this code doesn't work. please can someone help me?
thanks a lot.


   

    template<size_t SIZE, class T>
    void foo()
    {
        T t;
        t.hello(SIZE);
        foo<SIZE-1, Hello_World>();
    }
    
    template<class T>
    void foo<0,T>()
    {
        cout << "end." << endl;
    }

    int main()
    {
        foo<4,Hello_World>();
    }
