Object* ip = new Integer(10); // create integer object Object* sp = new String("mylabel"); // create string object v.insertItem("weight", ip); // store in v's dictionary v.insertItem("label", sp); // ... Object* op = v.find("weight").element(); // retrieve weight const Integer* p = dynamic_cast<const Integer*>(op); // cast to Integer* int w = p->getValue(); // get its value