Scanf opengl

Hello, I have this code which reads indices from txt .

fscanf(file, "%d", &(o->planes[i].p[0]));
fscanf(file, "%d", &(o->planes[i].textures[0]));
fscanf(file, "%d", &(o->planes[i].normals[0]));

It reads them like the example: 1 2 3
I want to modify the code to read them like 1/2/3.

Can anyone help me plz


fscanf(file, "%d/%d/%d", &(o->planes[i].p[0]), &(o->planes[i].textures[0]), &(o->planes[i].normals[0]));

But if you’re reading OBJ format, you should ideally allow for the fact that the normal and/or texture indices can be omitted, i.e. each vertex can be any of “v”, “v/t”, “v//n” or “v/t/n”. That’s not something which can be done directly with fscanf().

Thanks a lot man, u really saved me…