i/o stream + substr

Hi, I want to read a text file that looks something like this

54112F
540C0000
540D00
540C0000
540D00
540400
5410000A
TIME 2540F49
and I want to split the 54's into one column, and the preceeding digits in another column on a GUI(FLTK) the time shows a new header for the code.
I already wrote the code to open and read file, but i dont know how to split the data into 2 colums
i need a loop somwwhere too.

please helpp

I know i have to use substring, but how?

thanks!
Last edited on
You would use std::getline() to get one line from the file into a string, and then you can use substring like normal.
Topic archived. No new replies allowed.