i have a problem and i think the solution might be pretty easy but im kinda stuck. I have some kind of config file wich im trying to parse in c++ to get some important values.
It looks like this:
info size=32 bold=0 italic=0 unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0
common lineHeight=32 base=27 scaleW=1024 scaleH=28 pages=1 packed=0 alphaChnl=1
chars count=74
char id=32 x=837 y=15 width=3 height=1 xoffset=-1 yoffset=31 xadvance=8 page=0 chnl=15
char id=33 x=802 y=0 width=4 height=19 xoffset=2 yoffset=8 xadvance=8 page=0 chnl=15
char id=35 x=292 y=0 width=17 height=19 xoffset=0 yoffset=8 xadvance=16 page=0 chnl=15
char id=37 x=177 y=0 width=19 height=19 xoffset=-1 yoffset=8 xadvance=17 page=0 chnl=15
char id=38 x=216 y=0 width=18 height=19 xoffset=0 yoffset=8 xadvance=18 page=0 chnl=15
Info, common and chars a basic/global values. Every char line should be saved in an array (or vector) of structs with a similar format (x, y, height, offsetX, offsetY ...)
Now i've tried getline() for example to get every line one by one and then make an istringstream with these lines to "search" those lines for the values i need. Its worth noticing that iam not needing all those values i need a way to just save the one i need for every line.
Thanks in advance for any help here!