Name: Anonymous 2009-11-26 5:16
Hi /prog/
I got a text file with each line representing an object and it's inherent values.
Formatting goes like this, just as a principle: "OBJECT;<int> a;<std::string> s;\n"
There's a couple of types of objects, all object of the same type has the same format and values.
---
My basic idea to read-in all the different objects is:
while Getline from file
Get "element" from line which goes on until a ';' is encountered
If the (first) element is "OBJECT_B" then we know that we're going to have, for example, string, string, int, long int,... and that's all.
But how do I do this? Help appreciated :)
I got a text file with each line representing an object and it's inherent values.
Formatting goes like this, just as a principle: "OBJECT;<int> a;<std::string> s;\n"
There's a couple of types of objects, all object of the same type has the same format and values.
---
My basic idea to read-in all the different objects is:
while Getline from file
Get "element" from line which goes on until a ';' is encountered
If the (first) element is "OBJECT_B" then we know that we're going to have, for example, string, string, int, long int,... and that's all.
But how do I do this? Help appreciated :)