로딩
요청 처리 중입니다...

[C++] 템플릿 1) 템플릿 사용하는 이유, 템플릿 함수

 [C++] 템플릿 1) 템플릿 사용하는 이유, 템플릿 함수

C++에서 템플릿을 왜 사용할까? 코딩할 때, 반복하는 부분은 일반화하는 코드가 좋은 코드이다.

C++에는 템플릿으로 여러 자료형으로 나타날 수 있는 함수 혹은 클래스를 간단하게 나타낼 수 있다. 이는 코드 유연성을 높혀주고, 재사용 가능한 알고리즘을 만들 수 있다.

이와 같은 Generic Programming은 다른 프로그래밍 언어에서도 찾아 볼 수 있다. https://en.wikipedia.org/wiki/Generic_programming Generic programming - Wikipedia Generic programming 28 languages Article Talk Read Edit View history Tools From Wikipedia, the free encyclopedia Not to be confused with Genetic programming . Generic programming is a style of computer programming i...

# C # 템플릿 # 클래스 # 독학 # 객체지향 # 개발자 # 개념정리 # it # define과 # 프로그래밍