I think I have a dangling pointer here, causing SIGSEGV Segmentation Fault crashes (usually appears when the same variable is removed from hash twice because it has two or more pointers going into the same thing).
Does anybody have a better way of assigning elements to a vector?
(This is Letter(int X,int Y,const char* Content) from the Letter class)
(I make multiple temporary instances of the class that are removed right after.)
You don't use pointers. You do use indices. (std::string has members operator[] and at(). The second throws if you do use bad index. You do use the first. It does not throw, so crash is uncontrollable.)
Line 4. What prevents out of range error from occurring?