发现在VS2013的环境下 定义构造函数时要写成:
teacher::teacher()
{
m_strName = "None";
m_iAge = 0;
cout << "这是无参数的构造函数" << endl;
}
teacher::teacher()
{
m_strName = "None";
m_iAge = 0;
cout << "这是无参数的构造函数" << endl;
}
2015-05-19