При запуске вот этого кода
| Код | #include "FileCtrl.hpp" #include <vcl.h> #pragma hdrstop #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void ListFiles(AnsiString path, TStrings* List) { Form1->Memo1->Lines->Add("lol"); TSearchRec sr; if (FindFirst(path+"*.*", faAnyFile, sr) == 0) { do { if (sr.Attr & faDirectory) { if (sr.Name!=".") if (sr.Name!="..") { ListFiles(path+sr.Name+"\\",List); } } else { AnsiString Ext=ExtractFileExt(sr.Name).UpperCase(); if (Ext==".CPP") List->Add(path+sr.Name); } } while (FindNext(sr) == 0); FindClose(sr); } Application->ProcessMessages();
}
void __fastcall TForm1::Button1Click(TObject *Sender) { ListFiles("c:\\",Memo1->Lines); } //---------------------------------------------------------------------------
|
Вылетает куча, ну просто такая куча, ошибок вот таких
[C++ Error] Unit1.cpp(26): E2206 Illegal character ' ' (0xa0) [C++ Error] Unit1.cpp(27): E2206 Illegal character ' ' (0xa0) [C++ Error] Unit1.cpp(27): E2206 Illegal character ' ' (0xa0) ....
Народ мож я что то пропустил в коде? |