Monday, November 29, 2010

Is there any shortcut for array size / length in C?

Programmer Question

Is there any way to speed up getting an array size in C?



Typing out sizeof(array)/sizeof(int) every time gets old. Do any C libraries have something like .length or is there some way I can define sizeof(array)/sizeof(int) as a shorter constant of some sort (possible also using dot notation)?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails