どこがいけなかったのでしょうか?
#pragma warning(disable:4996)
#include <stdio.h>
int main() {
char character[2048][128];
int cnt = 0;
int cnt2 = 0;
FILE *fp;
char buf[128];
if ((fp = fopen("test.txt", "r")) != NULL) {
while (fgets(buf, 128, fp) != NULL) {
cnt2 = 0;
while (buf[cnt2] != int('\0')); {
character[cnt][cnt2] = buf[cnt2];
printf("%c", character[cnt][cnt2]);
cnt2++;
}
cnt++;
}
}
while (1) {}
}