How to read mixed format txt file in C++

Hey! Hope you had very nice time during last vacations!

I have a problem in C++ to read a text file of a format:

vertex 1 2 3
vertex 2 3 4
vertex 23 4 5
.
.
.
segment 3 4 5
radius 4

I want to read this file and make some calculation and write a file! So i have three strings (vertex, segment, radius) in my txt file. How I could do that!
Any help will be appreciated!
Last edited on
I don't know the process of triangulation, so I can only give you this: http://en.wikipedia.org/wiki/Triangulation . Go from there.
Topic archived. No new replies allowed.