// Assign one or more tags void Todo::AddTag () { Tag aTag; string tagText; // Add aTag to the vector of tags [strings] cout << "Enter tag: " << ends; getline(cin, tagText); aTag = tagText; // Valid if it doesn't contain any invalid chars (#defined) while ( !aTag.IsValid() ) { cout << "Invalid tag format, enter another: "; getline(cin, tagText); aTag = tagText; } // Add new tag to MyTags MyTags.push_back(aTag); cout << endl; }