you guys have helped me so much with this code. Let me preface by saying I do not know C very well and am trying really hard to do this.
This is what the program sho
You probably don't have 10 megabytes of stack space. Make that array global, declare it with static
, or allocate it dynamically using malloc()
. If you choose the latter, don't forget to free()
it.
Later, when you need to use the 100,000,000 element array, make sure to use a new allocation for it!
Well there is no way you are going to have that amount of space available on the stack. Allocate it off the heap using malloc(). Remember to free() it afterwards.