K
Krzysztof Kolago
Hello!
I wrote program that should read binary file, but it read only a part of
it (13690 of 64KB). Maybe somebody can help me, and will tell me, how to
modificate program source. I need to read all bytes of the file!
My source:
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
main() {
signed int Plik = open("tomo.raw", O_RDONLY);
unsigned char bufor[64*1024];
int Tablica[64*1024];
int dlugosc;
if(Plik < 0) return(1);
dlugosc = read(Plik,bufor,sizeof(bufor));
for(int i = 0; i < dlugosc; i++) {Tablica = bufor;}
close(Plik);
for(int i = 0; i < dlugosc; i++){printf("%i ", Tablica);}
printf("--- %i", dlugosc);
}
+Chris-
I wrote program that should read binary file, but it read only a part of
it (13690 of 64KB). Maybe somebody can help me, and will tell me, how to
modificate program source. I need to read all bytes of the file!
My source:
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
main() {
signed int Plik = open("tomo.raw", O_RDONLY);
unsigned char bufor[64*1024];
int Tablica[64*1024];
int dlugosc;
if(Plik < 0) return(1);
dlugosc = read(Plik,bufor,sizeof(bufor));
for(int i = 0; i < dlugosc; i++) {Tablica = bufor;}
close(Plik);
for(int i = 0; i < dlugosc; i++){printf("%i ", Tablica);}
printf("--- %i", dlugosc);
}
+Chris-