cplus version of DOM