Try to use STL List instead of STL Vector.
1. Use vector<Block*> instead of vector<Block>.
2. Add PianoRoll::sortBlockPos(vector<Block*>* vec);
3. Back to using STL vector, not STL list.