网页搜索引擎(300分)

  • 主题发起人 主题发起人 liuguan
  • 开始时间 开始时间
拆分文件的关键api是哪个?
 
createfile
Writefile
closehandle
 
谁能写好这个(主要是急用,要不自己就动手了)

我开个帖子再给他200分
 
var
StringListAll, StringList1: TStringList;
s: string;
i, j: Integer;
begin
StringListAll := TStringList.Create;
StringList1 := TStringList.Create;
StringListAll.LoadFromFile('thelargefile');
sLast := '';
j := 0;
for i := 0 to StringListAll.Count - 1 do
begin
s := StringListAll;
if s[2] <> ']' then //不为空的
StringList1.Add(s)
else
begin
Inc(j);
StingList1.SaveToFile(IntToStr(j) + '.txt');
StringList1.Clear;
end;
end;
StringListAll.Free;
StringList1.Free;
end;
 
太粗糙了

请改动程序 并 以我给出的资料试验一下
 
如果你会delphi编程,我想给你这样的代码已经足够了
 
==============================
改错200分
==============================

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type
TFileSplite=class
public
procedure Splite(FileName:string);
//procedure SavetoFile;
end;

var
Form1: TForm1;

implementation

{$R *.dfm}
Procedure TFileSplite.Splite(FileName:string);
//var FileName:String;
var GatherStrList,SpliteStrList,TempFile:TStringList;
var i,TittleSign:integer;
var Tempstr:string;

begin
GatherStrList:=TStringList.Create;
SpliteStrList:=TStringList.Create;
GatherStrList.LoadFromFile(FileName);//load GatheredFile
TittleSign:= 0;

for i := 0 to (GatherStrList.Count-1) do
begin
if GatherStrList<>'[ti' then
begin
TempStr:=GatherStrList;
TempFile.Add(GatherStrList[TittleSign]);
TempFile.Add(TempStr);
TempFile.SaveToFile(GatherStrList[TittleSign]);
end;
if GatherStrList='[ti' then
begin
TittleSign:=i;
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var SpliteFile:TFileSplite;
var FileName:string;
begin
FileName:=Form1.Edit1.Text;
SpliteFile:=TFileSplite.Create;
SpliteFile.Splite(FileName);
end;

end.

|||||||||||||||||||||||||||||||||||||||||||||||||||||||

请用上面给的例子(歌词格式)试验 必须通过

 
请看www.xmethods.com中有GOOGLE的WEB SERVICE
 
问题我已解决!!

就是请改错!!!我看看错在哪!!!
 
一到关要问题又没人动手了

唉 !

有多少人是抱着 混分 的目的来答帖子呢?
 
接受答案了.
 
后退
顶部