我正在使用 c++ 为学校做一个项目,该项目将被拆分为多个文件。
test_driver.cpp - a file to test the code written
storage.cpp - implementation file for storage class and methods
storage.h - header file for storage
song.cpp - implementation file for song class, songs are the data type being manipulated by storage
song.h - header file for song
我在哪里放我的#includes。存储取决于歌曲数据类型,因为它主要是操纵它们、更改标题和移动它们等。如果这似乎是一个新手问题,我很抱歉,但我真的不知道,也没有找到可靠的答案. 我还想声明一个全局常量在实现文件之间共享,这可能吗?