【问题标题】:How to emit a string with quotes using yaml-cpp?如何使用 yaml-cpp 发出带引号的字符串?
【发布时间】:2023-04-01 04:58:01
【问题描述】:

我想使用 yaml-cpp 发出一个带引号的字符串,所以它看起来像

time_stamp: "2011 年 8 月 10 日 01:37:52"

在输出 yaml 文件中。我该怎么做?谢谢。

【问题讨论】:

    标签: yaml-cpp emit


    【解决方案1】:
    YAML::Emitter out;
    // ...
    out << YAML::DoubleQuoted << "August 10, 2011 01:37:52";
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-02-18
      • 2017-10-09
      • 2013-02-06
      • 1970-01-01
      • 2015-10-04
      • 2013-10-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多