I want to learn how to parse text files. Especifically, I want to work with .obj files.

I have read about the the basics of the obj format, but I'm wondering what standard library functions should I use to read it efficiently. For instance, I want to read the following vertexes

v 5.672271 1.802055 -5.287645
v 6.117182 1.802056 5.492141
v -5.000000 1.803496 4.999999

into this struct:

Code:
struct vertex
{
    float x,y,z;
} vertex_data[num_of_vertexes];
Could someone give me an example of what functions I could use to do it?