reading text file into array mulit line c++
===

I created a text file love.txt

    i love you
    you love me

how do i store them into separate array namely line1 and line2 and then display them out in console.

    1.i love you
    2.you love me

    #include <iostream>
    #include <fstream>
    #include <string>
    using namespace std;
    
    int main()
    {
        string line1[30];
        string line2[30];
        ifstream myfile("love.txt");
        int a = 0;
        int b = 0;
        if(!myfile) 
        {
                    cout<<"Error opening output file"<<endl;
                    system("pause");
                    return -1;
        }
        while(!myfile.eof())
        {
          getline(myfile,line1[a],' ');
          cout<<"1."<<line1[a]<<"\n";
         getline(myfile,line2[b],' ');
           cout<<"2."<<line2[b]<<"\n";
        }

