게임 개발자
close
프로필 배경
프로필 로고

게임 개발자

  • 분류 전체보기 (79)
    • Algorithm (11)
    • Unreal (48)
    • C++ (13)
    • The Wild Card 제작 (6)
  • 홈
  • 태그
  • 방명록

[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=..

  • format_list_bulleted C++
  • · 2024. 12. 23.
  • textsms
  • navigate_before
  • 1
  • navigate_next
공지사항
전체 카테고리
  • 분류 전체보기 (79)
    • Algorithm (11)
    • Unreal (48)
    • C++ (13)
    • The Wild Card 제작 (6)
최근 글
인기 글
최근 댓글
태그
  • #UI
  • #reflection
  • #card game
  • #network
  • #STL
  • #c++ project
  • #c++
  • #Algorithm
  • #UnReal
  • #LYRA
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바