Unable to match function for call using struct and enum

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.

1
2
3
    
    enum Title {Miss, Mrs, Mr, Dr, Unknown};
   


Then in my structure, I attempted to call the variables from the enum like this

1
2
3
4
5
6
    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

1
2
3
4
5
6
    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`

Topic archived. No new replies allowed.