View Single Post
Old 12-2-2012, 12:07 AM   #17
Patashu
FFR Simfile Author
Retired StaffFFR Simfile Author
 
Patashu's Avatar
 
Join Date: Apr 2006
Location: we traced the call...it's coming from inside the house
Age: 33
Posts: 8,609
Send a message via AIM to Patashu Send a message via MSN to Patashu Send a message via Yahoo to Patashu
Default Re: C++ fstream and arrays

I would write in a better* programming language and use regexes with capture groups to parse each line and spit out the individual elements for you

*better for non robotic beings

your regex would be something like
(\w+) \[(\d+),(\d+),(\d+),(\d+),(\d+)\]\[(\d+)\]\[(\d+)\]
(make sure to double all backslashes if your language doesn't have a way to specify to ignore them, like @" in C# and r" in python)
then you can search a line for that regex, take the match and use the contents of each match (first match will be username, second match onwards will be da numbers)
__________________
Patashu makes Chiptunes in Famitracker:
http://soundcloud.com/patashu/8bit-progressive-metal-fading-world
http://img.photobucket.com/albums/v216/Mechadragon/smallpackbanner.png
Best non-AAAs: ERx8 v2 (14-1-0-4), Hajnal (3-0-0-0), RunnyMorning (8-0-0-4), Xeno-Flow (1-0-0-3), Blue Rose (35-2-0-20), Ketsarku (14-0-0-0), Silence (1-0-0-0), Lolo (14-1-0-1)
http://i231.photobucket.com/albums/ee301/xiaoven/solorulzsig.png
Patashu is offline   Reply With Quote