Board index » cppbuilder » Syntax errors - simple component
JD
CBuilder Developer |
Syntax errors - simple component2003-11-21 05:58:46 PM cppbuilder26 I want to install a StringGrid decendant to the pallette but I'm getting compile errors. May I have some help please? I have no clue what to do with this error [C++ Error] MGrid.cpp(21): E2188 Expression syntax I presume that all I need to do is add a semicolon but I don't understand this error [C++ Error] MGrid.cpp(35): E2379 Statement missing ; //-------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "MGrid.h" #pragma package(smart_init) //-------------------------------------------------------------- static inline void ValidCtrCheck(TMGrid *) { new TMGrid(NULL); } //-------------------------------------------------------------- __fastcall TMGrid::TMGrid(TComponent* Owner) : TStringGrid(Owner) { public: //<<<<<<<<<<-------- line 21 void __fastcall MoveRow( int FromIndex, int ToIndex ) { inherited::MoveRow( FromIndex, ToIndex ); } void __fastcall InsertRow( int Index ) { ++RowCount; inherited::MoveRow( RowCount - 1, Index ); } void __fastcall DeleteRow( int Index ) { inherited::DeleteRow( Index ); } } // <<<<<<<<<<<<<------------- line 35 //-------------------------------------------------------------- namespace Mgrid { void __fastcall PACKAGE Register() { TComponentClass classes[1] = {__classid(TMGrid)}; RegisterComponents("IDEAtum", classes, 0); } } //-------------------------------------------------------------- #ifndef MGridH #define MGridH //-------------------------------------------------------------- #include <SysUtils.hpp> #include <Classes.hpp> #include <Controls.hpp> #include <Grids.hpp> //-------------------------------------------------------------- class PACKAGE TMGrid : public TStringGrid { private: protected: public: __fastcall TMGrid(TComponent* Owner); __published: }; //-------------------------------------------------------------- #endif |