【发布时间】:2014-07-16 20:40:53
【问题描述】:
用template <int N>定义模板是什么意思,我是从书中的一个例子中读到的:
typedef map<int, double> row;
template <int N> struct matrix;
{
map <int, row> my_matrix;
}
我经常看到模板后面跟着类然后输入,即template <class int>
【问题讨论】:
-
template<class int>无效。