// Datentypen von Indizes: std::map _articlesById; std::set _articlesByPrice; Engine::createArticle(char *title, char *descr, unsigned price, User *owner) { unsigned id = nextArticleId(); Article *art = new Article(id, title, descr, price, owner); // ID-Index einfügen _articlesByID.insert(make_pair(id, art)); // Index für billigste Artikel pflegen _articlesByPrice.insert(art); }