You're not showing enough code. The 5 lines in your post before last look perfectly legal to me, in isolation.
I'm getting some sort of unexplained exception thrown by this on around the 65th element's deletion. The array is 128 elements.
|
This is the important bit. It sounds like you're going out of bounds of your characters array.
This is partially a guess, but please show the initialization of your characters array and any time you modify it.
Also, if the array size is 128, why are you only going up to i < 127?
That might be a potential source of the problem.
_____________________________________________
I should check, but my understanding is that WORD is a guaranteed 2 bytes, no matter what kind of machine you compile for |
The 2nd part of your statement here doesn't make sense, because WORD is a macro defined in <windows.h>, i.e. it isn't portable C++ code. You can continue to use WORD if you want, just know that it's a Windows-only macro.
WORD is a macro who's substitution is
unsigned short
. Depending on the system, it's possible for shorts to be 32-bit. I'm just letting you know. This is most likely unrelated to your problem, although I can't be sure of that since I don't know all the code.