read paragraph by paragraph from a text file

hi guys i am trying to read a text file which is like paragraphs and each line gives different information and also each words of the line gives a different information. how do i read each words and each line and then paragraph to next paragraph.
06.passengers.volume.A = 5 // this line means in hour 6 (between 6:00-6:59 am)no.of passengers entering station A is random from 0-5.
06.passengers.volume.B = 10 //this line means in hour 6 (between 6:00-6:59 am)no.of passengers entering station B is random from 0-10
06.passengers.destination.B = 5 //there is a 5% chance that a passenger's destination is one of the “B” stations, regardless of the station from which the passenger originates

07.passengers.volume.A = 5
07.passengers.volume.B = 15
07.passengers.destination.B = 5
so far i have

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <cstdlib>
using namespace std;

int main () {
  string line,line2,line3;
  int i=0;
  ifstream myfile("a3.txt");
  if (myfile.is_open()){
  while(!myfile.eof())
  {
    getline (myfile, line);
     cout << "line ["<<++i<<"]:" << line << endl;
     }
  }
    return 0;
}

Topic archived. No new replies allowed.