#include <stdio.h>
#include <math.h>
#include <string.h>
main() {
char str[20000]={0};
char* test_string;
double count_economy=0, count_politics=0, count_total=0;
FILE* fpe = fopen("C:\\train\\economy\\index.economy.db", "r");
FILE* fpp = fopen("C:\\train\\politics\\index.politics.db", "r");
while (!feof(fpe)) {
fgets(str, 20000, fpe);
count_economy++;
memset(str,0,20000);
}
while (!feof(fpp)) {
fgets(str, 20000, fpp);
count_politics++;
memset(str,0,20000);
}
count_total=count_economy+count_politics;
를 이용해 문서의 개수를 세는데는 성공! 나머진 내년 데블스캠프때....