News for hackers. Stuff that matters.
Re:A nice, little known C feature: Static array indices in p... by chc on Monday February 18, 2013 @01:03PM (#5239568)
This works with pointers in both C and C++. int (*foo)[10] is a pointer to an array of exactly 10 elements. The novel thing being pointed out in the OP is the "10 or more" aspect.
Re:A nice, little known C feature: Static array indices in p... by cliffbean on Monday February 18, 2013 @07:01PM (#5241684)
That's true, until you forget and type foo[i] instead of (* foo)[i]. Of course, compilers will usually catch that mistake at compile time...

There'a an interesting analogy with structs here. K&R invented the -> operator specifically to obviate (* ptr).member. It's too bad that arrays took a different route through C's history and didn't manage to end up in a place where a similar convenience would make sense.