What is the purpose of Dereferencing non pointer variable

There isn’t a direct single function equivalent, but String.GetCharArray( ).GetData( ) is basically what it’s doing (it omits the GetCharArray call since it can just use the member variable directly that function normally returns).

Thanks for the detailed explanation

I can understand smart pointers using this syntax cause i use it with smart pointers, but they are pointers., at least in name.

And i can now see how Strings and iterators can have same design, but that use case is new to me for non pointer types.

Now that i know its common ill just stick to the *operator too and join the club.
cheers.

1 Like