I have an array problem that i want to overcome, if i change the value of const int \"are\" to 2048 the program runs fine but at 8192 or even at 4096 ( just 130,000 elements
You are putting the data structure on the stack in main, and it is pretty huge. You can either increase the stack size (depends on your system), or allocate the structure on the heap with new or malloc.