N
Naveen
Hello All.
I am trying to compile this code on Borland 5.6.4. The compiler is
throwing up this error message:
"main.cpp": E2299 Cannot generate template specialization from 'B<T>'
at line 12
Any help to fix this would be appreciated.
--Naveen.
// -------------------- Code Starts here ----------------------------
//
#include <iostream>
class A { };
template <typename T>
class B : public A
{
public: B() { }
};
class Testing
{
public:
template <typename T>
void load( int key, B<T>& sort = B<T>())
{
}
};
void main()
{
Testing ab;
ab.load<int>(10);
}
//
// -------------------- End of Code -----------------------
I am trying to compile this code on Borland 5.6.4. The compiler is
throwing up this error message:
"main.cpp": E2299 Cannot generate template specialization from 'B<T>'
at line 12
Any help to fix this would be appreciated.
--Naveen.
// -------------------- Code Starts here ----------------------------
//
#include <iostream>
class A { };
template <typename T>
class B : public A
{
public: B() { }
};
class Testing
{
public:
template <typename T>
void load( int key, B<T>& sort = B<T>())
{
}
};
void main()
{
Testing ab;
ab.load<int>(10);
}
//
// -------------------- End of Code -----------------------