Error code E0745
The address of temporary value was taken.
Erroneous code example:
ⓘ
In this example, 2
is destroyed right after the assignment, which means that
ptr
now points to an unavailable location.
To avoid this error, first bind the temporary to a named local variable: