simple example@ptr to method[[Essential c++]]

I tried repeatedly but unsuccessfully to wrap my mind around ptr to methods, until I hit P130 [[essential c++]].

Your class should have a bunch of sister methods with identical params and identical returns. Remember every ptr VARIABLE[1] exists as (compile time) symbol table entry with
– a name,
– a value (address of the pointee) and
– a declared type

This pointer var can point to any of those sister methods, but not any look-alike methods in other classes.

[1] there’s no such thing as a “pointer” — only pointer _variables_ and pointee addresses.

发表评论

Fill in your details below or click an icon to log in:

WordPress.com 徽标

您正在使用您的 WordPress.com 账号评论。 登出 /  更改 )

Google photo

您正在使用您的 Google 账号评论。 登出 /  更改 )

Twitter picture

您正在使用您的 Twitter 账号评论。 登出 /  更改 )

Facebook photo

您正在使用您的 Facebook 账号评论。 登出 /  更改 )

Connecting to %s