I have the function below which accepts a bool pointer. I\'m wondering if there is any notation which allows me to set the value of the is
field to true
No.
There is no syntax to define a pointer to a primitive type, other than the zero value returned by new
. The same goes for numeric types, and strings.
You either need to create a value before hand to take the address of, or you create the pointer with a zero value, and assign a new value after the fact.