2026-27-cpp-homework/feladat3/feladat3/main.cpp
2026-10-28 16:54:20 +01:00

27 lines
No EOL
639 B
C++

// IFPQYY | Tóth Dániel Mátyás | V2
#include "feladat3.h"
#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
char infn[MYMAXFILES][MYMAXFN];
char outfn[MYMAXFILES][MYMAXFN];
static unsigned char buf[MYBUFSIZE];
unsigned short minv, maxv, avgv, nv;
if (GetFilenames(argc, argv, infn, outfn) == NOK)
{
return(NOK);
}
for (int n = 0; (n < MYMAXFILES) && (infn[n][0] != '\0'); n++)
{
if (SortFile(infn[n], outfn[n], buf, &minv, &maxv, &avgv, &nv, MYBUFSIZE, true) == NOK)
return(NOK);
}
/*cout << argc;
for (size_t i = 0; i < argc; i++)
{
cout << '\n';
cout << argv[i];
}*/
return(OK);
}