Hacker News new | ask | show | jobs
by tgv 906 days ago
Are those consts really necessary? There are also a few character missing after char *d.
2 comments

> Are those consts really necessary?

Technically yes, initializing a plain char * from a const char * (from array decay) is a constraint violation (an error the standard requires the compiler to detect and complain about) even in C89. Many compilers will let you off with a warning though.

which characters are missing?
"]=" after "*d["
It's not necessary in C.

   const char *d[{"First","Second",...,"Twelf"};
is not a valid C unconditionally.
You should tell my compiler.