Inheriting a template class
-
Hi , I have a template class like template public ref class MyBaseclass. I need to inherit this class on another one like. public ref class Derivedclass:MybaseClass. Could you please let me know whats the syntax for doing like this ?Sorry I am new to VC++.
-
Hi , I have a template class like template public ref class MyBaseclass. I need to inherit this class on another one like. public ref class Derivedclass:MybaseClass. Could you please let me know whats the syntax for doing like this ?Sorry I am new to VC++.
template<typename T>
ref class Base
{
public:
Base(T value) : _value(value) {}
T get_value() { return _value; }
private:
T _value;
};ref class Derived : Base<String^>
{
public:
Derived(String^ value) : Base(value) {}
};"We make a living by what we get, we make a life by what we give." --Winston Churchill