View Problem

Add an entry to a map

Given an empty pets map, add the mapping from "rob" to "dog"
ExpandDiskEdit
ruby
pets['rob']='dog'
ExpandDiskEdit
cpp C++/CLI .NET 2.0
pets->Add("rob", "dog");
ExpandDiskEdit
cpp C++/CLI .NET 2.0
pets["rob"] = "dog";

Submit a new solution for ruby, csharp, or cpp
There are 19 other solutions in additional languages (clojure, erlang, fantom, fsharp ...)