// Reading Files

#include <iostream>
#include <fstream>

using namespace std;


void main() {

	ifstream inFile( "input.txt", ios::in);

	if ( !inFile ) {
		cerr << "File could not be opened\n";
		exit(1);
	}

	char name[30];
	int val;

	inFile >> name;  // Read in an array of char
	inFile >> val;   // Read in an integer

	cout << "Read from file: name = " << name << endl;
	cout << "  first val = " << val << endl;
	
	while ( inFile >> val ) {
		cout << "   next val = " << val << endl;
	}

} //end main()

/*

Input file contains:

Bob
111
22
333
4
55555
66 77 88 99

*/