How to get the vertex index array corresponding to the model material

How to get the vertex index array corresponding to the model material in C++.