CSC302 2007S, Class 12: More C Stuff, Including a Bit on Make Admin: * Assigned: HW5. * Due: HW4. * The readings for Monday are the same as the readings for last Monday * McCarthy's History of Lisp * Two things by Paul Graham If you commented already, you might rescan them. * Don't forget lunch with Atul Gupta today JR25C PDR 224C. * I'm not thrilled at the number of you who submitted HW after midnight. * And I know that you're not thrilled that I provided you with non-working code. Overview: * Quicksort, continued. * Representing points. /Before the end of class on Wednesday .../ * Testing * Typedefs * Macros * How C programmers think * Project: genericize Quicksort * End of class problem: * How do you define a comparator type? typedef int (*comparator)(BASETYPE x, BASETYPE y); * How do you use a comparator once you've defined that type?: (*comp)(foo,bar) >= 0 * How do you define a comparator once you have the type? int ilt(int x, int y) { ... } Refactoring problem: * Whoops! I need to sort integers and strings at different points in my program.