|
VCL에 종속적이지 않는 클래스를 만들려고 합니다.
일반 클래스 만들어서 붙일려고 하는데요..
header file과 cpp file 추가하고 컴파일 하니까..
아래와 같은 메세지가 나옵니다 .
다음은 테스트하려고 만든 코드입니다.
// TestClass.h ----------------------------------------------------
class TestClass
{
public:
char temp[100];
void Set(char *p);
}
// TestClass.cpp ---------------------------------------------------
#include <string.h>
#include "TestClass.h"
void TestClass::Set(char *p)
{
memcpy(temp,p,sizeof(p));
}
// 에러 내용 -------------------------------------------------------
[C++ Warning] TestClass.cpp(4): W8058 Cannot create pre-compiled header: header incomplete
[C++ Error] TestClass.cpp(4): E2176 Too many types in declaration
[C++ Error] TestClass.cpp(5): E2111 Type 'TestClass' may not be defined here
[C++ Error] TestClass.cpp(5): E2316 'TestClass::Set(char *)' is not a member of 'TestClass'
file->New 에 보니까 Unit 묘듈이 있던데 이걸로 추가 해야 하나요?
이걸로 해봐도 마찬가지였던 거 같던데...
질문을 쓰고 있는 저도 한심한 생각이 듭니다. 가장 기본적인 건데... -.-;;;;;;
답변 감사..............................
|