{
printf("%s and %s compare failed: \nline: %d\n%s\n%s\n", f1, f2, nLine, line1, line2);
s1.close();
s2.close();
exit(1);
}
}
if(s1.eof() && !s2.eof())
{
printf("%s and %s compare failed: s1.eof() && !s2.eof()", f1, f2);
s1.close();
s2.close();
exit(1);
}
else if(!s1.eof() && s2.eof())
{
printf("%s and %s compare failed: !s1.eof() && s2.eof()", f1, f2);
s1.close();
s2.close();
exit(1);
}
}
else
{
printf("compare file open failed: \n%s\n%s\n", f1, f2);
s1.close();
s2.close();
exit(1);
}
s1.close();
s2.close();
}
void Exec(char *cmd)
{
DWORD code = 0;
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
文章来源于领测软件测试网 https://www.ltesting.net/