Question
CONCEPTS Stacks Files Write a program that reads a text file (provided) and then prints to a separate text file all the data, but in
CONCEPTS
Stacks
Files
Write a program that reads a text file (provided) and then prints to a separate text file all the data, but in reverse order. The resulting file should be the best movie quotes from Steel Magnolias (https://www.imdb.com/title/tt0098384/)
STACK CLASS You will have a header file that contains a Stack class specification and member function definitions. This should be a template class that can accept any data type. The stack should be implemented using a linked list. The Stack class should have the following member functions:
Constructor
Push
Pop
isEmpty
Name your program fileReverser.cpp.
Your program should use the Stack class. In order to write a text file in reverse to a separate file, you will have to open the text file (named file1.txt) and read its contents into a stack of characters. Then, pop those characters from the stack and save them in a second text file (named file2.txt). This resulting file should contain a readable file of Steel Magnolias movie quotes.
WHAT TO TURN IN
fileReverser.cpp
Stack.h
file1.txt
file2.txt
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started