Pointers
Printing Pointers
You can print pointers with {:p}
formatter and *const
with {:?}
formatter.
Meaning behind {:?}
It means to debug-format a value.
And then you can use :?
formatter to print it or store its formatted value.
{}
surrounds formatting directives.:
separates the name / ordinal of the value being formatted. In this case({:?}
), it's omitted.
Last updated
Was this helpful?