hdr in cpp