i want to read data from a file... and store in separate string arrays. i know how to read the whole file into one array. but i need to read 10 lines and store in one array and another 10 lines and store in another array.. likewise 8 times.please help
well, if new line is the indicator of your one line, then count 10 new line, when you would reach the 10th new line you will start storing in your next array.
use getline api and read the each line from the file and maintain the count to read the lines from file.
if counts reach 10 means stop adding into first CStringArray. If the count starts 11, so start adding into another CString Array.
like wise you can split.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)