回 帖 发 新 帖 刷新版面

主题:高手请看

我建立了一个student.h头文件和类的实现student.cpp,在主函数文件assignment1.cpp中要怎么把这些文件包含进去,你知道,我要在主函数中用到这个类

回复列表 (共2个回复)

沙发

在 student.cpp 中写上#include "student.h"

然后在assignment1.cpp 中写上#include "student.cpp "

板凳

在assignment1.cpp中加上#include "student.h" 更常用

我来回复

您尚未登录,请登录后再回复。点此登录或注册