1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define SIZE 10 int main(void) { int buffer[SIZE]; FILE *fp = NULL; int i; fp = fopen("binary.bin", "rb"); if (fp == NULL) { fprintf(stderr, "binary.bin ÆÄÀÏÀ» ¿ ¼ö ¾ø½À´Ï´Ù."); return 1; } fread(buffer, sizeof(int), SIZE, fp); for (i = 0; i<SIZE; i++) printf("%d ", buffer[i]); fclose(fp); return 0; } | cs |