Question
C++ In this assignment, your program will be writing to and reading from a file and display some ASCII Art. Requirements: 1. Create a user-defined
C++
In this assignment, your program will be writing to and reading from a file and display some ASCII Art.
Requirements:
1. Create a user-defined function writeToFile(). One of its parameters should be the file name the function writes to. The function takes two lines of input text and write to a file. (For 1 extra credit, design the function to take any number of lines of any text.) For example, you may write the following two lines -
o o \__/
2. Create a user-defined function called readFromFile() that takes file name as a parameter. The function should display the content in the file.
3. Surround the two user defined functions with a namespace block and name the namespace your name (using underscore to connect the first name and last name, because namespace name dose not allow spaces.)
4. In main(), make function calls to both functions.
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