Well here is what I suggest you do instead. Make a simple vector of strings, read the strings with in with a space for a delimeter, and push it onto the vetor.
Code:
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
int main (void)
{
using namespace std;
ifstream inFile("Engineer.dat", ios::out);
vector<string> engine;
string temp;
short i = 0;
cout << " View ...\n" << endl;
while (getline(inFile, temp, ' '))
{
engine.push_back(temp);
cout << ++i << ". " << temp << "\n";
}
inFile.close();
cin.get();
return 0;
}
OUTPUT:
View ...
1. Jason
2. Bush
3. ComputerScience
4. 04/02/2004
5. $45.000