I was looking at an online C language quiz and came across this: This will never compile. Guess why. Because You can’t initialize struct members in declaration. Here is what gcc 7.2.1 will throw: [arnuld@arch64 programs]$ gcc -ansi -pedantic -Wall -Wextra t.c t.c: In function ‘main’: t.c:6:13: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ […]
↧