Q:

Template class specialization function call. C++

consider this code.
template<class T>
class A
{
    public:
      void f(){..}
      void h(){..}
};

template<>
class A<int>
{
    public:
      void f(){// something different..}
      //void h(){..}
};

int main()
{
    A<int> obj;
    obj.h(); // I want to call A<T>::h(), but compiler erred that there is no h function in A<int>
}

Is there a way to this call?? Or some workaround? 

A:

A<T> is a class template that introduces a family of classes A based on any typename T. A<int> is an explicit specialization of A<T> - it supersedes the generic class definition. It's no different from having written:
class Aint {
public:
    void f(); 
};

This specialization only has a single member function - f. So when you try to do this:
A<int> obj;
obj.h();

That doesn't compile because A<int> does not have a member function named h. Despite both being named A, A<int> and A<T> are unrelated - one is not a base class of the other, and it doesn't matter what functions and members exist in the general A<T> - the A<int> specialization doesn't have them. 
If h is something common, you could move it into a base class:
struct ABase { // or alternatively ABase<T>
    void h();
}

template <typename T>
class A : ABase {
    void f();
};

template <>
class A<int> : ABase {
    void f();
};

That way all of the instantiations of A would have an h(). That is, until somebody goes ahead and adds:
template <>
class A<char> // no inheritance
{
    // no h()
};

