Hello, I am having trouble going about taking a text file with a bunch of entries, like A43 A32 B45 A35 B23 etc, and having the numbers with A infront stored in one vector and the numbers with B infront stored in another. Anyone have hints for me?
so far i only know to do this:
string filename, line;
vector<string> anums, bnums;
ifstream infile(filename);
while(getline(infile, line))
{
// somehow search the line and place each number in one of the vectors
// until the end of the line, then it starts on next line until end of file.
// Am i going to be using line.find() to find A and B then copying the next
// position until i reach a space, then using find again?
}
infile.close();