5 ms·
Are those consts really necessary? There are also a few character missing after char *d.
by tgv 3y ago
Are those consts really necessary? There are also a few character missing after char *d.
- junon 3y agowhich characters are missing?
- huhtenberg 3y ago"]=" after "*d["
- junon 3y agoIt's not necessary in C.
- tgv 3y agoYou should tell my compiler.
- huhtenberg 3y agoconst char *d[{"First","Second",...,"Twelf"}; is not a valid C unconditionally.
- mananaysiempre 3y ago> 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.