对拍

今天和crk学了c语音的对拍 感觉贼亲切啊,相比b语音的:loop 简直不友好。。。
对比一下,,b的纯背的代码啊。。。

:loop
  mkdt.exe
  std.exe
  a.exe
  fc std.out a.out
  if %errorlevel%==0 goto loop
pause

然后是c:

    int order;
    while (true)
    {
        system("mkdt.exe");
        system("std.exe");
        system("vio.exe");
        if(system("fc out1.txt out2.txt")) {cin>>order;if(order) break;}
    }

好多system。。好烦。。于是:

#include<bits/stdc++.h>
using namespace std;
#define run system
int main()
{
    int order;
    while (true)
    {
        run("mkdt.exe");
        run("std.exe");
        run("vio.exe");
        if(run("fc out1.txt out2.txt")) {cin>>order;if(order) break;}
    }

} 

这样就很帅了。。。。。。。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值