/* CSE 333 Su12 lecture 12 demo: compare_solution_one/compare.h */ /* Gribble/Perkins */ // A standard solution to the "where is the template code?" problem // Header file defines template complete with code, which is expanded // when client #includes and instantiates it. #ifndef _COMPARE_H_ #define _COMPARE_H_ template int comp(const T& a, const T& b) { if (a < b) return -1; if (b < a) return 1; return 0; } #endif // COMPARE_H_