原因: 1.没有包括需要的头文件 2…h中的函数没有实现(构造函数特别容易漏掉) 参考: https://blog.csdn.net/gongziwushuang/article/details/95453477