1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
erik [133]
3 years ago
11

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.
Computers and Technology
1 answer:
diamong [38]3 years ago
6 0

Question:

Write the definition of a function named fscopy that does a line-by-line copy from one stream to another. This function can be safely passed two fstream objects, one opened for reading, the other for writing. In addition, it gets a bool argument that is true if the output lines are to be numbered, and another argument, an int that specifies line-spacing in the output.

Assume that the input source is a text file consisting of a sequence of newline character-terminated lines. The function 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. It returns the number of lines read in. If it the third parameter, the bool is true, every line that is output is preceded by a 6-position field holding the line number (an integer) followed by a space and then the actual line. If the last argument, the int is 2 or more, it specifies the line spacing: for example, it is 3, there are two blank lines output after each line printed. These blank lines are NOT numbered.

Answer:

void fscopy(fstream &fsin, fstream &fsout)

{

string s;

getline(fsin, s, '\n');

while (!fsin.fail( ) )

{

fsout << s << endl;

getline(fsin, s, '\n');

}

}

You might be interested in
Using the flowchart diagram, identifythe decision point of this solution?
ELEN [110]

Answer:

Is there an early pay discount?  

Explanation:

This determines and instructs what path the code should take,

if there is no early pay discount, it has different instructions to follow.

3 0
3 years ago
What is the best free game designing program for windows
Nadusha1986 [10]
Python, Unity 3D, C++Notepad
8 0
3 years ago
Draw a flowchart diagram for a program that displays numbers 1 to 20
madreJ [45]
Here you go plz mark brainlist
6 0
2 years ago
A user from the financial aid office is having trouble interacting with the finaid directory on the university's ERP system. The
Harlamova29_29 [7]

Answer:

A. The permissions on the finaid directory should be drwxrwxrwx.

Explanation:

The financial aid system is developed to record the fund inflow and outflows. The ERP system of the university has finaid system on which commands are run and output is received. The permissions on the finaid directory should be drwxr to enable the users to run the commands.

5 0
3 years ago
WILL GIVE BRAINLIEST PLEASE HELP / urgent
Alex Ar [27]
Web design is awesome! Alright, so -

If you want to call some attention to text, you need to focus on the basic essentials. 

You want your text to be brief and split up. If someone goes on your site and see's walls of text, they'll be overwhelmed and leave.

So, to call attention - make it brief, and split it up into nice paragraphs.

Another way to call attention to text is to have a <em>really </em>good colour scheme. Having text easy on the eyes attracts the reader more, and encourages them to dive deeper.

If your text is unattractive and hard to look at it, it'll certainly get their attention - but not the attention you want.

Finally, another way to call attention is with visual adjustments such as making text bold, making it <em>italicised, </em>making it ALL CAPS, <em>or just GOING CRAZY WITH UNNECESSARY TEXT ATTENTION ATTRACTING POWER!!!!!!!

</em>Ahem... Anyways, these are just a few ways to get their attention. =) If you need any other help, private message me because I love web development! =)<em>
</em>
4 0
3 years ago
Other questions:
  • When employees are hired, they agree to only use cell phones during breaks. How would you classify this?
    8·2 answers
  • Using features on demand results in saving potentially significant amounts of disk space. features on demand becomes a third ins
    14·1 answer
  • Which of the following statements is false? People tend to shortcut security procedures because the procedures are inconvenient.
    13·1 answer
  • how can you create fades with the smart tool? How can you specify the types of fade curves that are used with the smart tool?
    13·1 answer
  • How do you compare text on different pages of a document?
    14·1 answer
  • How do you check how much space is left in current drive?
    9·1 answer
  • Question 4 (Multiple Choice Worth 5 points)
    6·1 answer
  • . A wireless ……..is a device used to resolvewireless network connectivity problems.
    8·1 answer
  • LIST THE BEST 10 3D PRINTERS WITH THEIR RESPECTIVE APPLICATION SOFTWARES.
    5·2 answers
  • Which native windows application allows you to access basic pc settings and controls such as system information, controlling use
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!