Hi

I am new to C++ and I want to write a programm that reads lines from a file into character arrays and then splits them (the arrays) into two parts. The first part is before the delimeter (usually " ") and the second after it. The file is consisted of eleven lines. The first is a number that must be stored in a k variable. The 10 remaining have 2 numbers each and the numbers are divided by a space (" ")
e.g
---Start of file-----
5
2 12
3 45
1 20
5 34
7 29
8 84
10 28
9 14
---End of file-----

Total eleven lines

Here's how I think the code should be. Please help me fill in the missing parts of the loop


int k;
ifstream b_file("input.txt");
b_file>>k;
//The above part reads the first number and stores it in k var


for (i=1; i<=10; i++)
{
//The code in here must input Line of file into Line[i] string
//the code in here must split Line[i] into TempA[i] (this is the first number of the line) and TempB[i] (this is the second number of the line) with " " as the delimeter
}
b_file.close();


Thanks for your help

Wh1t3w0lf