declaration terminated incorrectly

Giganews Newsgroups
Subject: declaration terminated incorrectly
Posted by:  Edward (eduglobo20…@globo.com)
Date: Sun, 26 Mar 2006

There is other error:

I Declare these class on Unit1.cpp and on Unit1.h i put  #include
<IdSync.hpp>

But i get the error "declaration terminated incorrectly"

What going on?

Edward

class TRichEditLog : public TIdSync
{
  private:

    AnsiString FStr;

  public:

    __fastcall TRichEditSync(const AnsiString &AStr):TIdSync()
<--------------------------------------on this line "declaration terminated
incorrectly"

    {
      FStr = TimeToStr(Time()) + ":> " + AStr;
    }

    virtual void __fastcall DoSynchronize()
    {
      Form1->RichEditLogFtpServer->Lines->Add(FStr);
    }

    static void __fastcall Add(const AnsiString &AStr)
    {
      TRichEditSync *Sync = new TRichEditSync(AStr);
      try
      {
        Sync->Synchronize();
      }
      __finally
      {
        delete Sync;
      }
    }

};

"Edward" <eduglobo20…@globo.com> wrote in message
news:0EF0B750D2F1E240eduglobo20…@globo.com...
>
> Why the client are not receive the List of files ?
>
> That is my code:
>
> void __fastcall TForm1::IdFTPServer1ListDirectory(TIdFTPServerThread
> *ASender, const AnsiString APath, TIdFTPListItems *ADirectoryListing)
> {
>  TSearchRec sr;
>  int iAttributes = 0, ct=0;
>  String ADirectory;
>  ADirectory = ASender->HomeDir + APath;
>
>  if (FindFirst( AnsiString("*.*"), iAttributes, sr) == 0)
>  {
>    ADirectoryListing->Add();
>    ADirectoryListing->Items[ct]->FileName = sr.Name;
>    ADirectoryListing->Items[ct]->Size = sr.Size;
>    ADirectoryListing->Items[ct]->ModifiedDate =
> FileDateToDateTime(sr.Time);
>    if(sr.Name.SubString(1,1) == "." || sr.Name.SubString(1,2) == "..")
>    {
>      ADirectoryListing->Items[ct]->ItemType + ditDirectory;
>    }
>    else
>    {
>      ADirectoryListing->Items[ct]->ItemType + ditFile;
>    }
>  }
>  while(FindNext(sr) == 0)
>  {
>    ct++;
>    ADirectoryListing->Add();
>    ADirectoryListing->Items[ct]->FileName = sr.Name;
>    ADirectoryListing->Items[ct]->Size = sr.Size;
>    ADirectoryListing->Items[ct]->ModifiedDate =
> FileDateToDateTime(sr.Time);
>    if(sr.Name.SubString(1,1) == "." || sr.Name.SubString(1,2) == "..")
>    {
>      ADirectoryListing->Items[ct]->ItemType + ditDirectory;
>    }
>    else
>    {
>      ADirectoryListing->Items[ct]->ItemType + ditFile;
>    }
>  }
>  FindClose(sr);
> }
>
> Edward

Replies

In response to

FTPServer List of Files Does Not Send to Client. Why ? posted by Edward on Wed, 22 Mar 2006