View Problem

Define a static list

Define the list [One, Two, Three, Four, Five]
ExpandDiskEdit
cpp C++/CLI .NET 2.0
array<String^>^ input = {"One", "Two", "Three", "Four", "Five"};
Generic::List<String^>^ list = gcnew Generic::List<String^>((Generic::IEnumerable<String^>^) input);
ExpandDiskEdit
cpp C++/CLI .NET 2.0
Generic::List<String^>^ list = gcnew Generic::List<String^>();

list->Add("One");
list->Add("Two");
list->Add("Three");
list->Add("Four");
list->Add("Five");
ExpandDiskEdit
cpp
std::string input[] = {"One", "Two", "Three", "Four", "Five"};
std::list<std::string> list(input, input + 5);
ExpandDiskEdit
cpp
std::list<std::string> list;

list.push_back("One");
list.push_back("Two");
list.push_back("Three");
list.push_back("Four");
list.push_back("Five");
ExpandDiskEdit
cpp C++0x/C++11
list<string> lst = { "One", "Two", "Three", "Four", "Five" };
ExpandDiskEdit
cpp boost
list<string> lst;
lst += "One", "Two", "Three", "Four", "Five";

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