P
Pawel_Iks
Hello!
I would like to write my own class which read text files with some
special form and get some data from this file. Here is the example of
typical txt file which i'm going to use:
dimensions:
a = 3, // description of a
b=10, //description of b
c=23;
variables:
float sth(a,b); //description
sthrop1="description"
float sth_else(a,b); //description
sthrop1="description"
data:
a={0,1,2,3,4};
b={4,5,3,2}
c={1,1,1,1,1,1,1,2,3,4,5,56,6,4,3,3,54,3};
now I would like to use string and fstream classes to read such file
and get dimension names, dimension values etc. I need to neglect
strings starting with '//' and so on. Maybe there is some other class
to deal with this problem. I will be grateful for all kinds of hints...
I would like to write my own class which read text files with some
special form and get some data from this file. Here is the example of
typical txt file which i'm going to use:
dimensions:
a = 3, // description of a
b=10, //description of b
c=23;
variables:
float sth(a,b); //description
sthrop1="description"
float sth_else(a,b); //description
sthrop1="description"
data:
a={0,1,2,3,4};
b={4,5,3,2}
c={1,1,1,1,1,1,1,2,3,4,5,56,6,4,3,3,54,3};
now I would like to use string and fstream classes to read such file
and get dimension names, dimension values etc. I need to neglect
strings starting with '//' and so on. Maybe there is some other class
to deal with this problem. I will be grateful for all kinds of hints...