템플릿 링크에러
글쓴이: nowhere1122 / 작성시간: 목, 2013/10/03 - 11:13오전
템플릿 구현하려는데 헤더와 cpp파일은 무조건 나눌려고 합니다.
헤더 아랫부분에 cpp파일 인클루드 해봤는데도 링크에러가 나네요.
헤더파일
#ifndef BLIST_H
#define BLIST_H
template
class BList
{
public:
BList();
~BList();
}
#include "BList.cpp"
#endif // BLIST_H
cpp파일
#ifdef BLIST_CPP
#define BLIST_CPP
#include "BList.h"
template
BList::BList()
{
}
template
BList::~BList()
{
}
#endif
Forums:
템플릿은 못나눕니다. 전부다 클래스 정의안에
템플릿은 못나눕니다. 전부다 클래스 정의안에 때려밖으세요.
댓글 달기