Notes For Presentation
Notes For Presentation
void displayMenu()
void displayMenu(): Declares the function displayMenu with no return type or
parameters.
cout << "Menu:" << endl;: Prints "Menu:" followed by a newline.
cout << "1. Add to File" << endl;: Prints option 1 for adding text to the file.
cout << "2. View File" << endl;: Prints option 2 for viewing the file content.
cout << "3. Overwrite File" << endl;: Prints option 3 for overwriting the file.
cout << "4. Clear File" << endl;: Prints option 4 for clearing the file content.
cout << "5. Search in File" << endl;: Prints option 5 for searching text in the
file.
cout << "6. Exit" << endl;: Prints option 6 for exiting the program.
cout << "Enter your choice: ";: Asks the user to input a choice from the menu.