copy.cpp

来自「非常好用的五子棋游戏源码」· C++ 代码 · 共 23 行

CPP
23
字号
// Created:10-10-98
// By Jeff Connelly

// File copying.

#include "stdafx.h"
#define EXPORTING
#include "comprlib.h"
#include "copy.h"

// Note: Byte-by-byte copying is slow.  If you were writing to a file, try:
//     long len = filelength(fileno(source_file));
//     char* buf = xmalloc(len);
//     fread (buf, 1, len, source_file)
//     fwrite (buf, 1, len, dest_file);
// That would eliminate repeated function calls and ultimatly be faster.

void EXPORT  copy()
{
    while (!end_of_data())
        write_byte(read_byte());
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?