[C++]템플릿 사용 시 파일 분할
개요일반적인 c++ 프로젝트에서 파일분할은 다음과 같다.헤더파일(.h) : 클래스 선언소스파일(.cpp) : 클래스 정의그리고 헤더파일에서는 #include를 지양하고 cpp파일에서만 헤더파일을 include하는 식으로 의존성을 관리한다.하지만 template의 경우 조금 다르기에 정리해보고자 한다. Template의 파일 분할만약 다음과 같이 파일을 분할 하였다면 코드는 다음과 같은 것이다.PointTemplate.h : 클래스 템플릿 선언PointTemplate.cpp : 클래스 템플릿 정의PointMain.cpp : 클래스 사용 PointTemplate.h #pragma oncetemplate class Point{private: T xpos, ypos;public: Point(T x=0, T y=..