Cpp Creating Instance Of A Function That Has Only One Root