# include<iostream>
# include<string>
using namespace std;
template<class NameType, class AgeType>
class Person
{
public:
	Person(NameType name, AgeType age)
	{
		this->m_Name = name;
		this->m_Age = age;
	}
	NameType m_Name;
	AgeType m_Age;
	void showPerson()
	{
		cout << "m_Name:" << this->m_Name << "m_Age:" << this->m_Age << endl;
	}
};
void test01()
{
	Person<string, int>p1("孙悟空", 999);
	p1.showPerson();
}
int main()
{
	test01();
	system("pause");
	return 0;
}  



京公网安备 11010502036488号