C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[59661] Re:Re:클래스만들때 에러요...
이용태 [] 959 읽음    2010-01-07 20:20
class TGrid : public TStringGrid
{
     public:
                  TGrid()
                   {
                   }

};

이렇게 변경을 했어도 동일한 에러가 발생합니다.

Lyn 님이 쓰신 글 :
: 기본생성자를 선언만 하고 구현을 안했네요
:
: 이용태 님이 쓰신 글 :
: : TStringGrid를 상속받아 TGrid라는 클래스를 만들려고 하는데요
: :
: : class TGrid : public TStringGrid
: : {
: :     public:
: :                  TGrid();
: : };
: :
: : 다음과 같은 에러가 납니다.
: : "Complier could not generate default constructor for class 'TGrid'"
: :
: : 왜 그런건가요?
: :
: :
: : //.h
: : //---------------------------------------------------------------------------
: :
: : #ifndef Unit1H
: : #define Unit1H
: : //---------------------------------------------------------------------------
: : #include <Classes.hpp>
: : #include <Controls.hpp>
: : #include <StdCtrls.hpp>
: : #include <Forms.hpp>
: : #include <ComCtrls.hpp>
: : #include <Grids.hpp>
: : //---------------------------------------------------------------------------
: :
: : class TGrid : public TStringGrid
: : {
: :     public:
: :                  TGrid();
: : };
: :
: :
: :
: : class TForm1 : public TForm
: : {
: : __published:    // IDE-managed Components
: :     TStringGrid *StringGrid1;
: :
: : private:    // User declarations
: : public:        // User declarations
: :     __fastcall TForm1(TComponent* Owner);
: :
: :     TGrid *myGrid;
: : };
: : //---------------------------------------------------------------------------
: : extern PACKAGE TForm1 *Form1;
: : //---------------------------------------------------------------------------
: : #endif
: :
: :
: :
: :
: :
: :
: :
: : //.cpp
: : #include <vcl.h>
: : #pragma hdrstop
: :
: : #include "Unit1.h"
: : //---------------------------------------------------------------------------
: : #pragma package(smart_init)
: : #pragma link "ntabed"
: : #pragma link "replist"
: : #pragma resource "*.dfm"
: : TForm1 *Form1;
: : //---------------------------------------------------------------------------
: : __fastcall TForm1::TForm1(TComponent* Owner)
: :     : TForm(Owner)
: : {
: :     myGrid = new TGrid;
: : }
: : //---------------------------------------------------------------------------

+ -

관련 글 리스트
59658 클래스만들때 에러요... 이용태 972 2010/01/07
59661         Re:Re:클래스만들때 에러요... 이용태 959 2010/01/07
59663                 Re:Re:Re:Re:클래스만들때 에러요... 이용태 1026 2010/01/07
59666                     Re:Re:Re:Re:Re:클래스만들때 에러요... 방콕폐인 1102 2010/01/07
59671                         Re:Re:Re:Re:Re:Re:클래스만들때 에러요... 이용태 998 2010/01/08
59676                             Re:Re:Re:Re:Re:Re:Re:클래스만들때 에러요... 방콕폐인 965 2010/01/08
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.