I am stuck on a small part of a task I am trying to complete and each word must be trimmed so that a word contains only alphabetic letters when I read from a .txt file. This is apart of an AVL tree yes but the problem I believe lies within the reading of the text document.
I have tried ise isalpha but can not get it to work and have run out of ideas and am stuck in a situation here. I will appreciate any help given to me!
           cout << "Input a file name (dictionary.txt):" << endl;
            cin >> file;
            myfile.open(file);
            if (!myfile) {
                cout << "\nFile does not exist." << endl;
                return 0;
            }
            else cout << "\nDictionary has been loaded." << endl;
            while(!myfile.eof()) {
                myfile >> insert;
                DATA newItem;
                newItem.key = insert;
                tree.AVL_Insert(newItem);
                count++;
            }
 
    