// -------------------------------------------------- // STANDARD LIBRARIES // -------------------------------------------------- // CORRECT #include // INCORRECT... although still works //#include "stdio.h" // -------------------------------------------------- // PROGRAMMER-DEFINED HEADERS // -------------------------------------------------- // CORRECT #include "includeA.h" // INCORRECT AND FAILS //#include // CORRECT #include "headers/includeB.h" // CORRECT BUT REQUIRES COMPILING WITH "-I headers" OPTION // So the complete command is: "gcc -I headers -o include include.c //#include "includeB.h" // AWFUL but works. Just think what would happen if // someone moved the files and compiled them in another directory... for // example if you downloaded these files and compiled them on attu //#include "/homes/iws/magda/cse303-10wi/lectures/lecture15/headers/includeB.h" // -------------------------------------------------- int main() { A itemA; B itemB; itemA.a = 3; itemB.b = 4; printf("My itemA: %d\n",itemA.a); printf("My itemB: %d\n",itemB.b); return 0; }