1

The code like this

class A
{
public:
    typedef int C;
public:
    A()
    {

    }
    int x = 0;
};

void FuncA(A::template C a)
{
     std::cout << a;
}

void FuncB(A::C a)
{
     std::cout << a;
}

int main()
{
     FuncA(1);
     FuncB(1);
}

The code can successfully complie. When i run it, looks FuncA and FuncB has the same result.Whats' the difference between them.What's the template mean in FuncA.

Aesma
  • 11
  • 2

0 Answers0