demo.cpp的头文件为:#include <iostream>
#include <stdlib.h>
#include <string>
#include "teacher.cpp"
teacher.h的头为
#include <string>
using namespace std;
tercher.cpp的头为:
#include "teacher.h"
已经在Mac下使用sublime和vscode还有g++测试通过
#include <stdlib.h>
#include <string>
#include "teacher.cpp"
teacher.h的头为
#include <string>
using namespace std;
tercher.cpp的头为:
#include "teacher.h"
已经在Mac下使用sublime和vscode还有g++测试通过
2017-03-14
class Student
{
public:
Student(){}
Student(string _name){}
Student(const Student& stu) {}
~Student()
{
}
void setName(string _name)
{
m_strName = _name;
}
string getName()
{
return m_strName;
}
private:
string m_strName;
};
{
public:
Student(){}
Student(string _name){}
Student(const Student& stu) {}
~Student()
{
}
void setName(string _name)
{
m_strName = _name;
}
string getName()
{
return m_strName;
}
private:
string m_strName;
};