有这样的模板类:
strcuct obj
{
.....}template<class T,int M>
class Cceshi
{
....}template<class T,int M> Cshi::int ccc(Cceshi<T,M> m_shi1,Cceshi<T,M> m_shi2)
{
...........................}使用如下:
Cceshi<Obj,12> m_ceshi;
Cceshi<Obj,11> m_test;
ccc( m_ceshi, m_test);我这样写编译总无法通过,于是我把Cshi改成模板类
template<class T,int M> Cshi<T,M>::int main(Cceshi<T,M> m_shi1)
{
...........................
}
可是
template<class T,int M> Cshi<T,M>::int main(Cceshi<T,M> m_shi1,Cceshi<T,M> m_shi2)
{
...........................}
是不能实现的
各位大狭请帮帮我