template 함수 (1) 썸네일형 리스트형 [C++] Template 함수 (템플릿 함수) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include #include using namespace std; template int Compare(T t1, T t2) { return t1 - t2; } int Compare (const char *str1, const char *str2) { return strcmp(str1, str2); } void main() { if (Compare(10, 5) > 0) { cout 이전 1 다음