相关疑难解决方法(0)

使用boost :: property_tree :: ptree将注释写入ini文件

有没有办法使用boost :: property :: ptree在ini文件中写注释?

像这样的东西:

  void save_ini(const std::string& path)
  {
      boost::property_tree::ptree pt;
      int first_value = 1;
      int second_value = 2;

      // Write a comment to describe what the first_value is here
      pt.put("something.first_value", );
      // Write a second comment here
      pt.put("something.second_value", second_value);

      boost::property_tree::write_ini(path, pt);
  }
Run Code Online (Sandbox Code Playgroud)

这里的文档没有提供信息.有没有提升工具呢?

提前致谢

c++ ini boost

5
推荐指数
1
解决办法
1399
查看次数

标签 统计

boost ×1

c++ ×1

ini ×1