/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);

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 15RQ
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,