But when I tried implementing my crowdout inference rule using an array of dlists to keep track of which rows a number is possible in any 1 given column, I forgot that rows and columns start from 0, but numbers from 1. So the above member function works when I want to keep a list of numbers starting from 1, but not from 0. Another good reason to always document/comment your code! Had the top code snippet failed to compile (as I presume should have been the case) I could have been saved hours trying to debug.... alas...
Any ideas on how to implement my dlist for rows, columns, and other datatypes that logically start from 0 without having to remember to increment each function call? i.e. crowd[i].addN(rows+1);
Your code compiles because the compiler does no bounds checking. It probably will result in a few unwanted runtime errors, though, like Segmentation Fault.
Probably it had not as much to do with the fact that it's less out of bounds than fbomb[-2000] than the fact that your section of memory wasn't allocated by any other program, and therefore not write protected, while fbomb[-2000] might have been.