2 ms·
Raw pointers "are" a type too. It's just that there isn't really syntax to describe the type, at least in the original declaration syntax. Note that structs an
by jstimpfle 2y ago
Raw pointers "are" a type too. It's just that there isn't really syntax to describe the type, at least in the original declaration syntax.
Note that structs and typedefs that you define are proper type names, you can switch out "int" for them. You can easily "typedef int *intPtr;" and then merrily go "intPtr myptr".
(I think cast type-specs might be a bit of an exception here were the rule breaks a bit -- because they don't "use" a name in the cast "expression". I don't intimately understand how those work. The whole thing is an idea that was stretched to the limits, especially with C++ where consistency has pretty much been given up).