Adding to a vector
Posted: Wed Dec 28, 2016 2:13 pm
I understand the most efficient way of adding to a vector is with a push_back. What if I want to add to the beginning of a vector? I should be able to do this with insert from what I read. If I do this, even with it locked, I get a nice error a few seconds later. Specifically I want to add to movement_loop. I have been reading about vectors and somewhat understand the workings, but not completely. Any idea what I cold be doing wrong here?
The exact error is...
The exact error is...
Code: Select all
*** Error in `/home/eq2/src/source/WorldServer/eq2world': double free or corruption (fasttop): 0x00007fffa859a3a0 ***
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffd27fc700 (LWP 16940)]
0x00007ffff6497067 in raise () from /lib/x86_64-linux-gnu/libc.so.6