I am trying to read a file line by line and then put in variables each word of the line
#include <iostream>
#include <string>
#include <fstream>
#include "record.h"
using namespace std;
void handleline(string& line1, int a)
{
    //cout<<line1[]<<"\n";
}
int main()
{
    string line1[30];
    ifstream myfile("30+.in");
    int a = 0;
    if (!myfile) {
        cout << "Error opening output file" << endl;
        return -1;
    }
    while (!myfile.eof()) {
        getline(myfile, line1[a], '\n');
        handleline(line1, a);
    }
}
the problem is that i cant pass the line as argument in to the function.
any help will be appreciated !
 
     
     
    