/this function will output three names to a file and not return anything outputNames () { outputObject; outputObject.open("the_file_to_print_to.txt"); string stringHolder; for (int i = 0; i <= ; i++) { cin >> stringHolder; << stringHolder; } << "I have output the three names to a file.\n" << endl; .close);

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.4: File Streams As Function Arguments
Problem 3E
icon
Related questions
Question
In C++ fill in the blanks
/this function will output three names to a file and not return anything
outputNames () {
outputObject;
outputObject.open("the_file_to_print_to.txt");
string stringHolder;
for (int i = 0; i <=
; i++) {
cin >> stringHolder;
<< stringHolder;
}
<< "I have output the three names to a file.\n" << endl;
.close(;
Transcribed Image Text:/this function will output three names to a file and not return anything outputNames () { outputObject; outputObject.open("the_file_to_print_to.txt"); string stringHolder; for (int i = 0; i <= ; i++) { cin >> stringHolder; << stringHolder; } << "I have output the three names to a file.\n" << endl; .close(;
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr