|
|
|
|
|
by Etheryte
3461 days ago
|
|
Given how many bugs & errors stem from simple fails in range checks etc, I would much rather go with the tried and true way rather than use something "clever". Quoting http://stackoverflow.com/a/16019052/1470607 Note that this trick will only work in places where `sizeof` would have worked anyway.
|
|
Unless you're writing a buffer overflow exploit, in which case you need to know exactly what's on the stack and where, this isn't a good way to program.
Update: misread the article; thought he was differencing with the beginning of the next array.