Game Development Community

T3D 1.1B3 Vector<T>::back() failes /w Fix - RESOLVED

by Thomas · in Torque 3D Professional · 02/25/2011 (5:10 am) · 2 replies

Tried to work with a torque Vector<T> in C++

Made the following:
Vector<int*> Test;
Test.push_back( new int );
*Test.back() = 1;
Crash...

Wondered and searched for an error in my code. But the definition of Vector<T>::back with return *end();
will never work. This has to be return *(end()-1);