Re: B const * array[ ] in gobal
On 9 Feb, 13:12, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
> soft wind wrote:
[...]
> That expression is sometimes called "function-style cast".
> Even when you do 'int(31.15)', it creates a temporary of type
> 'int', which only lives until the full expression is evaluated
> or until the object is fully initialised (if used in the
> initialisation expression). The difference (unfortunate) for
> you is that you're allowed to take the address of a class
> temporary, but not of a temporary of a built-in type.
Only if the class overloads the address-of operator.
--
James Kanze
|