C++配置文件相关

1.

#ifndef COMMON_H
#define COMMON_H
typedef struct _StructConfig{
    std::string file_name;
}StructConfig;
extern StructConfig sConfig;
#endif
Config configSettings("../config.ini");
sConfig.file_name = configSettings.Read("file_name", sConfig.file_name);
#config.ini文件
file_name=../test.mp4
原文地址:https://www.cnblogs.com/mathyk/p/12067303.html