Im writing a program in C (eclipse in linux) so I need to open a big text file and read it (and than try with diffrent size of buffer each time)
Anyways, this is the code and I don't understand why Im getting segmentation fault from the open function
int main(void)
{
int fd;
char* buff[67108864];
FILE *testfile;
double dif;
fd = open("testfile.txt", O_RDONLY);
if (fd>=0) {
read(fd,buff,67108864);
close(fd); }
return 0;
}
I have edited my question but now if I change my buffer to the biggest size I need (67108864 bytes) im still getting segmentation fault...