I order to simulate my network I am using a trace file (csv file) with a size between 5 to 30 GB. 
The csv file is a row based, where each row contains multiple fields delimited by a space and forming teh information to form a network packet: 

```
3     53      4    12    1     1  2  6

```

Since the file's size could reach several GBs (millions of lines), is it better to divided it into small chunks myfile00.csv, myfile01.csv..., or I can process the entire file on the hard drive without being loaded into the memory?
I want to read the file line by line at a specific time, which is the clock cycle of the simulation, and get all information in the line to create an omnet++ message.

```
packet MyTrace::getpacket() {
int id; // first field
int cycle; // second field
int source; // third field
int destination; // fourth field
int numberofDep; // fifth field
std::list<int> listofDep; // remaining fields

if (!traceFile.is_open()) {
 // get id
 // get cycle
 // ....
}

```

Any suggestion would be helpful. 

EDIT:

```
  string line;
  ifstream myfile ("BlackSmall.csv");
    int currentline=0 ;
  if (myfile.is_open())
  {
   while (getline(myfile, line)) {  

      istringstream ss(line);
      string request;
      int id, cycle, source , dest, srcType, destType, packetSize, dependency;
      int listdep;
      std::list<int> dep; 
              ss >> id; 
              ss>> cycle; 
              ss>> source; 
              ss>> dest;
              ss>>request;
              ss>> srcType;
              ss>> destType;
              ss>> packetSize;
              ss>> dependency; 
              while (ss >> listdep) dep.push_back(listdep);
           // Create my packet

    }
    myfile.close();
    }
  else cout << "Unable to open file"; 

```

With the above code, I can get all information that I need from a line.
The problem is that I need to use this code inside a class, which when I call it returns just one line's information. Is there a way how to point to a specific line when I call this class?