I am a c++ newbie, so I don't even know what optimized actually means. it's just my debugger telling me the value is optimized. |
That's probably just the debugger telling you that it can't tell you what the values contained in
sec are, because you're running an executable that was built with optimization on - commonly known as a "release" build. To get the full info you need for proper debugging, you'll want to build a "debug" build, with optimization switched off and debugging symbols included.
Consult your compiler/IDE documentation for details on how to do this.
Looking at your code, I notice that at lines 21 - 28, you're attempting to use a value from the
secl array, but at that point you haven't initialized the array or assigned any values to it. This means that the value of
secl[i] is undefined. This will almost certainly lead to bugs in your code.
This may well mean that the objects being passed into
SecurityList::insert() are in an undefined state, causing the crash you're seeing.