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) { } ... 

Closed due to the fact that it was off topic by Nicolas Chabanovsky August 31 '16 at 4:42 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - Nicolas Chabanovsky
If the question can be reformulated according to the rules set out in the certificate , edit it .

1 answer 1

Semicolon after class declaration.