If the values stored range over the entire span of doubles, then the only thing you can do is store some other type that keeps track of set/unset status. Pointers, as already noted, are a good choice. Or you can create a wrapper class around a double to track such things.
More likely, though, your data will occur over a more constrained range, and you can simply assign some value outside that range (say, -9999999.9) to represent 'unset'.
You could also keep a parallel array of bools, but that's a messy solution.
Bookmarks