Hi... I'm new here. I'm encountering a problem. Here's a segment of code that's giving me the problem:
void GGUI_Interface::setListBoxOption(int winindex, int lbindex, int option, std::string label)
if(lbindex < 0 || winindex < 0 || winindex >= 40)
if(lbindex >= mWindow[winindex].mNumListBoxes)
std::cout << mWindow[winindex].mListBox[lbindex].mHighlighted << std::endl;
mWindow[winindex].mListBox[lbindex].setOption(option, label, mFont, mRenderer);
Now I print out to console to prove that the object I'm pointing at exists, but when I run the program the last line in the function produces a segmentation fault error. The std::cout line prints -1 (which is what the object initializes to when created).
What could be the source of this? When I tested this object earlier, it worked just fine, and I've done nothing different. This is giving me a headache.