diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index e69de29..1321b2a 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(sandbox sandbox.cpp) +target_link_libraries(sandbox yaml-cpp) diff --git a/util/sandbox.cpp b/util/sandbox.cpp new file mode 100644 index 0000000..e0979f2 --- /dev/null +++ b/util/sandbox.cpp @@ -0,0 +1,18 @@ +#include "yaml-cpp/yaml.h" +#include + +int main() +{ + YAML::Emitter out; + out << YAML::BeginSeq; + out << "foo"; + out << YAML::Comment("Skills"); + out << YAML::BeginMap; + out << YAML::Key << "attack" << YAML::Value << 23; + out << YAML::Key << "intelligence" << YAML::Value << 56; + out << YAML::EndMap; + out << YAML::EndSeq; + + std::cout << out.c_str() << "\n"; + return 0; +}