Use c++ pass by reference for the internal function htmlScript.