MFC doesn't provide a container that does what you need, but you can use std::map or std::set instead. Each will keep the keys unique; which you choose will depend on whether you want your key separated from the payload or integrated into a single object.