here is the code. it actually now seems that i can have an array of size 1 and it wont seg fault. a value of 4 will seg fault at the end of the program (after data is printed). a value of 5 will not seg fault. a value of 20 will seg fault before the data is printed.
should i use malloc...
i havent programmed in C in years, i need to however for a project.
anyway, i'm reading in a data file and parsing it using basic file pointers. i read in all the data fine. however, when i try to declare a simple array, say, int my_array[10];, it seg faults. if i remove the code that reads in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.