this a simple conceptual question, i guess.
i have created a class, called Section.
and i created a bidimensional array of objects of that class: Section sections;
if i change it to , i get a segmentation fault error. is it because the program tries to alocate memory that it's not avaliable?
but when i run my program, the task manager says that my program is using only~60mb from RAM, and mor than halfis still avaliable. i can open other programs, such as chromium, etc.
I may be wrong here. However I'd usually expect a segmentation fault to be caused by accessing some memory area outside of that which is 'owned' by your program. Typically it might be caused a subscript out of range. If that's the case, it's not really related to the size of the array, but rather to the way in which it is later used (or misused).
One thing which raises alarm bells for me is the use of numeric literals such as 67 or 70 as hard-coded values. Section sections;
Because that way, anywhere in the program such as a for-loop where a subscript must be within the array bounds, it can be checked against rows or cols. The big advantage comes when you want to change the size of the array, you just change the value in one place and the entire program still retains its integrity.