配置文件应该与此类似:
此行被忽略,因为它不在一个部分中
[第 1 节]
KeyNameInt = 9 //这里注释
KeyNameString = string
KeyNameFloat = 15.32[第 2 节]
我尝试使用内置的注册表功能,但问题是保存设置非常慢
我推荐POCO XML。
/*
+-------------------------------------------------------------------------------+
| Pros: |
| * It's a lightweight cross platform library.<br/> |
| * It takes 5-10 minutes to compile **vs** boosts 2-3 hours compilation. |
| * It is self-explanatory.<br/> It is written in modern C++. |
| * You can make pretty and understandable configs using the proper indentation.|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| Cons:<br/> |
| * Not as advanced as boosts xml library. |
+-------------------------------------------------------------------------------+
*/