Question: 22. Given anifstream object named indata and an ofstream object named outdata , w other statements necessary to read oneinteger from a file called currentsales

 22. Given anifstream object named indata and an ofstream object named

22. Given anifstream object named indata and an ofstream object named outdata , w other statements necessary to read oneinteger from a file called currentsales its value into a file called projectedsales. Assume that this is the extent of the this program will do. write the and write twice input and output that 23. Given an ofstream object named output , and a string variable name tweet, write the other statements necessary to open a file named mytweet, display the prompt Enter tweet: a read an entire line into tweet and then write it out to the file mytweet. nd then (Do not define a main function.) Given an fstream object named todo, associate it with a file named todolist by opening the file for appending 24. 25. Write the definition of a function named fscopy This function can be safely passed two fstream objects one opened for reading, the other for writing. Assume that the input source is a text file consisting of a sequence of newline character-terminated lines. The function simply copies, line by line, the entire content of the data source associated with the first argument to the data target associated with the second argument. No value is returned

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!