I have a notepad that consist of two data which is the title and the name. I've declared the title using an enum.
The enum contain this variables.
enum Title {Miss, Mrs, Mr, Dr, Unknown};
Then in my structure, I attempted to call the variables from the enum like this
struct MyInfo
{
char name[MAX];
Title title;
};
I'm trying to extract value from the file and display it out on the monitor. Hence, i used the ifstream
method to get the information from the file
while(!afile.eof())
{
afile.getline(info.name, MAX);
afile.getline(info.title, MAX);
}
I do have another function to strcpy
a label into the title, however, i could not extract out the value from the enum in the file via the ifstream