2026-27-cpp-homework/feladat3/feladat3/main.cpp

27 lines
639 B
C++
Raw Normal View History

2026-10-28 16:54:20 +01:00
// IFPQYY | Tóth Dániel Mátyás | V2
2026-10-24 09:35:47 +02:00
#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);
}
2026-10-24 14:02:06 +02:00
for (int n = 0; (n < MYMAXFILES) && (infn[n][0] != '\0'); n++)
2026-10-24 09:35:47 +02:00
{
2026-10-25 08:47:08 +01:00
if (SortFile(infn[n], outfn[n], buf, &minv, &maxv, &avgv, &nv, MYBUFSIZE, true) == NOK)
2026-10-24 09:35:47 +02:00
return(NOK);
2026-10-24 14:02:06 +02:00
}
2026-10-24 09:35:47 +02:00
/*cout << argc;
for (size_t i = 0; i < argc; i++)
{
cout << '\n';
cout << argv[i];
}*/
return(OK);
}