Damage error with clearing a vector
I have a function that fills a vector. It can be run multiple times during the program, but I don't want it to keep filling the vector as many times as it is run. So I put in a check:
FAD is a global variable because it is accessed by a bunch of functions. .empty() returns 0 if there is somehting in the vector, but .clear() causes a run-time assertion error( Damage after Normal Block (#112)....).
if((FAD.vectDL.empty()) == 0)
Can I not clear a global vector? How would I get rid of this error?
I tried this without other functions that use the vector. I just ran this function twice in a row.