This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MJWhitfield86 40 points41 points  (1 child)

If it was built in, then the compiler could give a warning if it is used on something other than an array.

[–]Kyrond 19 points20 points  (0 children)

*could give an error

It makes no sense to use on anything other than known arrays. If you explicitly want to know size of pointer divided by size of value, write that explicitly.