Показать полную графическую версию : Создать шаблон
Как правильно создавать шаблоны в MVS2008?
Не получается создать.
template<class type>
type test(type a, type b)
{
return a + b;
}
int main()
{
cout << test(10, 20);
cout << test(10.5, 20.2);
}
template<class type1>
class test
{
public:
test() {}
type1 plus(type1 a, type1 b)
{
return a + b;
}
type1 minus(type1 a, type1 1);
};
template<class type1>
type1 test<type1>::minus(type1 a, type1 b)
{
return a - b;
}
int main()
{
test<double> t1;
test<int> t2;
t1.plus(10.1,10.2);
t2.minus(1, 2);
}
я не про это, я имел ввиду шаблон приложения
котвася File -> Export Template
Export Template Wizard (http://msdn.microsoft.com/en-us/library/ms185318(VS.80).aspx)
почему-то не работает. Или не активно Export Template. А если активно то нет выпадающего списка на основе которого создавать шаблон
© OSzone.net 2001-2012
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.