Помогите исправить ошибку в программе. С++ Builder
Задание: Дана строка символов, состоящая из цифр, разделенных пробелами. Вывести четные числа этой строки.
//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include
#include
#include "Unit1.h"
#include
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Edit1KeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
{
AnsiString s1=Form1->Edit1->Text;
if(Key==13){
ListBox1->Items->Add(Edit1->Text);}
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ListBox1DblClick(TObject *Sender)
{
int n, nst, z=0, s;
String result = ' ';
nst=ListBox1->ItemIndex;
AnsiString str=ListBox1->Items->Strings[nst];
for(n=1; n<=str.Length(); n++){
if (str[n]!=' ') z++;
if (str[n+1]==' ');
str=str.SubString(n,z);
s=str.с_str();
if ((atoi(s)%2)==0);
result+=str.SubString(n,z);
}
Label1->Caption=result;
}
//---------------------------------------------------------------------------
Ошибки: