Use STL to replace C structure