Added sandbox to play with
This commit is contained in:
parent
3634cb93dc
commit
4d602919c3
@ -0,0 +1,2 @@
|
|||||||
|
add_executable(sandbox sandbox.cpp)
|
||||||
|
target_link_libraries(sandbox yaml-cpp)
|
||||||
18
util/sandbox.cpp
Normal file
18
util/sandbox.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include "yaml-cpp/yaml.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user