Given an fstream object named menu, associate it with a file named todaysmenu.txt for output in a way that truncates (erases) any existing data in the file.
LANGUAGE: C++
CHALLENGE:
Given an fstream object named menu, associate it with a file named todaysmenu.txt for output in a way that truncates (erases) any existing data in the file.
SOLUTION:
menu.open("todaysmenu.txt",ios::out);
Posted in C++, Learn To Code