simple_cfg_reader 将*.cpp和*.hpp文件移动到您的项目文件夹中。 // main.cpp # include " simple_cfg_reader.hpp " simple_cfg_reader::cfg_file file ( " file.cfg " ); int main () { printf ( " %s \n " , file. read ( " line " )); } # file.cfg line = "value"