Sure enough, when I entered 5 for maxcells, it worked just fine. (5 seems to be the magic number. Any more than that, and I get the error.) But why? Does it have something to do with a limit on memory that is allowed to be allocated to a given array?
yeah it depends on the compiler, when i use MS Visual Studio, you have to go into properties and make the stack and heap larger so that you may use larger arrays. or in other words, you're giving your program more room to operate.
I see Heap Commit Size 0, Stack Commit Size 0, and the reserve sizes for both are set to 0 as well. What's typically considered a decent amount? Are these specified in bytes? I tried entering as much as thirty, and it still gave me the same result. (I have been able to compile it in Dev-C++ with no problems though.)
im not too sure, we covered this problem in lecture today. maybe try a larger number than 30? as far as if they're specified in bytes im not sure either. before being told how to solve the problem i just went and compiled it on linux. if you're still having a problem by the time i get home later on tonight i'll check for you
Well, I went all the way up to 1000000, and I still got the error. (It's also returning the wrong value for cell 4 now, even if I change it back to 0.) I don't get it. This code executes just fine in Dev-C++. Any other suggestions?