loadobj: use vector<> and be a bit more cplusplusy