procedure TForm1.btn1Click(Sender: TObject);
begin
CopyFile(edit1.text ,edit2.text , false); //前面是源文件的地址和文件名,后面是目标地址和文件名
end;有错:
[Error] Unit1.pas(34): Incompatible types: 'TCaption' and 'PAnsiChar'
[Error] Unit1.pas(34): Incompatible types: 'TCaption' and 'PAnsiChar'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'要怎么带入那两个参数啊?
begin
CopyFile(edit1.text ,edit2.text , false); //前面是源文件的地址和文件名,后面是目标地址和文件名
end;有错:
[Error] Unit1.pas(34): Incompatible types: 'TCaption' and 'PAnsiChar'
[Error] Unit1.pas(34): Incompatible types: 'TCaption' and 'PAnsiChar'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'要怎么带入那两个参数啊?
解决方案 »
- DELPHI的自定义界面设计问题?
- treeView中,选定一个节点时,折叠其他节点,应该如何实现?
- 导出excel的问题
- 如何在用SQL语句插入数据时,使用params[..].as 将空值插进去?
- 如何将一个Edit中的内容赋值给一个字符数组阿
- 恭喜senhor(百合)做非技术区的斑竹,放分支持,嘿嘿
- 李维-delphi7高效数据库程序设计
- 一个自定义打印预 览 的例子。有些问题
- 关于Paradox数据表的一个问题 急!
- 使用Adotable组件是否会影响程序运行速度?在什么情况下应该使用Adotable组件?
- Delphi改错
- delphi怎样连接Sqlite 运行的时候报Could not create output file
procedure TForm1.btn1Click(Sender: TObject);
begin
CopyFile(pchar(edit1.text) ,pchar(edit2.text) , false); //前面是源文件的地址和文件名,后面是目标地址和文件名
end;