我的代码哪里有问题
以下是有问题的代码
2.cpp
# include <iostream>
# include<stdlib.h>
# include<string>
# include "Teacher.h"
using namespace std;
int main(void)
{
Teacher t1("Merry", 12, 150);
cout << t1.getName() << " " << t1.getAge() << " " << t1.getMax() << endl;
system("pause");
return 0;
}
Teacher.h
#include<iostream>
#include<string>
using namespace std;
class Teacher
{
public:
Teacher(string name = "Jim",int age = 1,int m = 100);
void setName(string name);
string getName();
void setAge(int age);
int getAge();
private:
string m_strName;
int m_iAge;
const int m_iMax;
};