Reading in from a .txt file to a struct array that contains enum
问题 Here is my code enum Status {IN, OUT }; const int TITLE_SIZE = 50, ISBN_SIZE = 13, AUTHOR_SIZE = 25; struct Info { char title[TITLE_SIZE]; char isbn[ISBN_SIZE]; char author[AUTHOR_SIZE]; Status inOrOut; }; int main() { fstream dataFile; string filename; int numOfBooks = 0; Info *test = 0; int enumHolder = 0; cout << "How many books does the file contain? "; cin >> numOfBooks; test = new Info[numOfBooks]; cout << "Enter a file (with path) for input and output: "; cin >> filename; dataFile.open