The error is clear and concise, you may not understand it because it is in English, let me translate it:
~ / Projects / Queue using vector # ./main was called to terminate after launching an instance of 'std :: out_of_range'
The std::terminate
function is automatically called when an exception is thrown ( thrown ) but it is not collected ( catch ).
The exception thrown to you is std::out_of_range
that would be translated "Out of range" , this function is launched (among other reasons) when trying to access a memory area presumably handled by a container without the requested memory area belonging to said container.
That is exactly what happened to you, the error indicates that you are using std::vector
and you have surely called the function std::vector::at
which can throw the mentioned exception. The error tells you that you have accessed the position eighteen trillion four hundred forty-six thousand seven hundred forty-four trillion seventy-three thousand seven hundred nine million five hundred fifty-one thousand six hundred quincimes, which is the position 2 64 .
I bet you have passed a negative number to the function std::vector::at
and as the parameter is an unsigned integer type (usually std::size_t
) has overflowed.