|
볼랜드 C++빌더 정복 4.0 정태영저 가남사의 제25장 컴포넌트 만들기를 보고
컴포넌트 만들기를 하고 있습니다.
KeyPress이벤트를 오버로딩하는데 에러메시지가 자꾸 뜹니다. 책에서 하라는 대로
protected:에 잘 코딩했는데 컴파일 하면 오류가 납니다.
상위 클래스에 virtual로 선언되어있는데 충돌이 난다는 데 뭔지 모르것어요.
어떻게 고쳐야 하지요? 책이 잘못 된건가요?
부탁드립니다.
아래 소스코드및 에러메시지.
class PACKAGE TCustomTt : public TCustomMemo
{
private:
double FieldValue;
void __fastcall SetFieldValue(double A);
void __fastcall FormatNum();
protected:
void __fastcall KeyPress(char &Key);
...
..
.
에러 메시지:
[C++ Error] CustomTt.h(19): E2113 Virtual function '_fastcall TCustomTt::KeyPress(char &)' conflicts with base class 'TCustomMemo'
|