Dave Robillard wrote:
Because char*
usually means, you know, a pointer, not a variable length
array :)
.... char buf[] is, you know, equivalent to char* buf. You do know C,
yes? ;)
You *do* know C, yes? Well enough to judge others?
Hint: try this little proggy (gcc should compile it fine):
#include <stdio.h>
int main(int argc, char *argv[])
{
struct X
{
int a;
char buf[];
};
struct Y
{
int a;
char *buf;
};
printf("%d %d\n", sizeof(struct X), sizeof(struct Y));
}
/* Krzysztof */