Added half of the std::map conversion (we don't have reading from Values yet)

This commit is contained in:
Jesse Beder
2011-09-08 02:10:04 -05:00
parent 0e197b8723
commit 6ffc9ac788
3 changed files with 24 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
#include "yaml-cpp/value.h"
#include <map>
int main()
{
@@ -12,5 +13,12 @@ int main()
value["monkey"] = 5;
std::cout << value["monkey"].as<int>() << "\n";
std::map<int, std::string> names;
names[1] = "one";
names[2] = "two";
names[3] = "three";
names[4] = "four";
value["names"] = names;
return 0;
}