Update to use an `MCNameRef` instead, and you can directly do `r_id = MCdefaultstackptr -> getname();`