Added sandbox to play with

This commit is contained in:
beder 2012-05-20 01:46:08 -05:00
parent 831a925250
commit 4f55c96c77
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,2 @@
add_executable(sandbox sandbox.cpp)
target_link_libraries(sandbox yaml-cpp)

18
util/sandbox.cpp Normal file
View 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;
}