c++多个类时的文件组织

来源:互联网 发布:dnf台服辅助pop源码 编辑:程序博客网 时间:2024/04/26 00:48

五个文件:

Point .h

Point.cpp  #include  "Point .h"

ArrayOfPoint.h    #include  "Point .h"     Point是其内嵌对象

ArrayOfPoint.cpp  #include  "ArrayOfPoint.h"

filemain.cpp  #include  "ArrayOfPoint.h"      

注意:当类中有内联函数是最好将其定义在 .h 文件中,因为内联函数的定义必须出想在第一次调用前

原创粉丝点击