#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main () {
string line;
ifstream myfile ("example.txt");
cout<<"Enter Name: ";
getline(cin,Name);
if (myfile.is_open())
{
while (! myfile.eof() )
{
getline (myfile,line);
if (line = name)
{
// read next line and print it... but how?
}
myfile.close();
}