template <typename T>class X : public Y
template <typename T>class Parametr : public ParametrName{....... Parametr<T> ();...........};Parametr<float> *x;x = new Parametr<float>;
ошибка: undefined reference to `Parametr<float>::Parametr()'
C++ (Qt)template <typename T>class Parametr : public ParametrName{.......// Parametr<T> (); Parametr();...........}; template<typename T>Parametr<T>::Parametr( void ){..}
C++ (Qt)// файл MyClass.h#ifndef MYCLASS_H#define MYCLASS_H template<class T>class MyClass {...};#include "MyClass_Templates.cpp" #endif // MYCLASS_H
template <typename T> class X{......};......int n = 10;QVector<X<typename T>> *Y = new QVector(n).......Y<float>[j] = new X<float>(.....);
C++ (Qt)QVector<X<typename T>> *Y = new QVector(n)
C++ (Qt)template <typename T> class X : public BaseElement{}; QVector<BaseElement *> * ptrY = new QVector<BaseElement *> (n);(*ptrY)[0] = new X<float>(..);