词条 | BYTECOPY |
释义 | DOS SVGACC图形开发库函数 原型 extern void far bytecopy (void far *src, void far *dst, long numbytes) 输入 src - 指向被拷贝的数组的指针 numbytes - 从src拷贝的字节数(<65536) 输出 无返回值 dst - 拷贝后的数组 用法 BYTECOPY将指定数目的字节从src拷贝到dst。并且假定dst已经被合适地分配空间。此函数比使用for循环或MEMCPY要快的多。 例子 EXAMPLE /* * show byte copy */ #include <stdlib.h> #include <conio.h> #include "svgacc.h" void main(void) { int i; int test1[10], test2[10]; for(i=0;i<10;i++) { test1[i] = i; } bytecopy(test1,test2,sizeof(test1)); printf("ok...we initialized one array with data, copied that\"); printf("array to an a new array...here are the results:\"); printf(" \"); printf("source array destination array\"); for(i=0;i<10;i++) { printf(" %d %d\",test1[i],test2[i]); } exit(0); } |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。