1\拷贝文件该如何写2\哪里有turb c可以下载,多谢哦

1\拷贝文件该怎么写2\哪里有turb c可以下载,谢谢哦
1\拷贝文件该怎么写2\哪里有turb   c可以下载,谢谢哦

------解决方案--------------------
1. 没有库函数,得自己写
2. 网上一搜一大把。

对于1贴个转发的。。。。
int cpfile( const char *source, const char *dest )
{
FILE *fs, *fd;
char buff[4096];
int n;

fs=fopen( source, "rb " );
fd=fopen( dest, "wb " );

while( 1 )
{
if( !feof(fs) && ( n=fread( buff, sizeof(char), sizeof(buff), fs ) > ;=0 )
{
fwrite( buff, sizeof(char), sizeof(buff), fd );
} else if( feof(fs) ) {
fclose( fd );
fclose( fs );
return( 0 );
} else {
fclose( fd );
fclose( fs );
return( -1 );
}
}
}
------解决方案--------------------
BOOL CopyFile(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName,
BOOL bFailIfExists
);
-----------------
------解决方案--------------------
system( "copy *.* c:\\1\\ ");
------解决方案--------------------
2楼的无错误处理,要出错的。。