I can not find that I forgot, I do not see at close range:
Mistake:
[C++ Error] Unit1.cpp(11): E2141 Declaration syntax error Shape.h:
//---------------------------------------------------------------------- #ifndef ShapeH #define ShapeH //-------------------------------------------------------------------------- class Shape { private: double radius; public: Shape(double=0); void setRadius(double); double getRadius(); } #endif Shape.cpp:
//-------------------------------------------------------------------------- #pragma hdrstop #include "Shape.h" #include "Unit1.h" //-------------------------------------------------------------------------- #pragma package(smart_init) Shape::Shape(double radius){ this->radius = radius; } void Shape::setRadius(double radius){ this->radius = radius; } double Shape::getRadius(){ return radius; } Unit1.cpp:
//------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "Unit1.h" #include "Shape.h" //-------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; // <-- сюда показывает int count = 0; //-------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } ...