标题:谁能把下面的语言转为pascal
只看楼主
chaw899
Rank: 2
等 级:禁止访问
帖 子:48
专家分:11
注 册:2018-11-29
结帖率:88.89%
 问题点数:0 回复次数:0 
谁能把下面的语言转为pascal
#include <stdio.h>
#include <stdlib.h>
#define MAXLEN 1024

int main(int argc, char *argv[])
{
    if( argc < 3 )
    {
        printf("usage: %s %s/n", argv[0], "infile outfile");
        exit(1);
    }
    FILE * outfile, *infile;
    outfile = fopen(argv[2], "wb" );
    infile = fopen(argv[1], "rb");
    unsigned char buf[MAXLEN];

    if( outfile == NULL || infile == NULL )
    {
        printf("%s, %s",argv[1],"not exit/n");
        exit(1);
    }   
    int rc;
    fseek(infile,0x4b,SEEK_SET);
    while( (rc = fread(buf,sizeof(unsigned char), MAXLEN,infile)) != 0 )
    {
        fwrite( buf, sizeof( unsigned char ), rc, outfile );
}
fclose(infile);
fclose(outfile);
system("PAUSE");
return 0;
}
搜索更多相关主题的帖子: 语言 pascal int char exit 
2019-06-18 00:59



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-495327-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022387 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved