How can it has a output

Assignment Help C/C++ Programming
Reference no: EM131103294

Here is a struct clarification:

struct Target {

std::ostream &out;

std:: string name;

Target(const std::string &name, std ::ostream &out = std::cout;

bool isLeaf() const;
....
};

I wonder what is the field "out" use for? Instructors comment it "// stream where Target will prints its output". Target is not a function, how can it has a output? I also confused about "std::ostream &out = std::cout", don't understand what is it doing.

Reference no: EM131103294

Questions Cloud

Computer network security for a home : Assignment No. 1: Computer Network Security for a Home/Small scale Network.Learning outcomes:1. Identify the various threats and risks in a small scale network2. Describe and compare a number of different techniques to secure a network3. Analyse, eva..
Exceeded market demand : If you were an operations manager, what would you do if market demand exceeded the production capacity of your manufacturing facility? What action would you take if the production capacity of your manufacturing facility exceeded market demand?
How did what you learned from the interview : How might you be able to use what you learned from the interview in your future work with children and families? (These might be specific tips and strategies for helping a child who is learning English, or a heightened awareness of the problems an..
Strategic controls and financial controls : What are the differences between strategic controls and financial controls, and how do they relate to organizational structure? What is the importance of these differences?
How can it has a output : I wonder what is the field "out" use for? Instructors comment it "// stream where Target will prints its output". Target is not a function, how can it has a output? I also confused about "std::ostream &out = std::cout", don't understand what is it..
Different types of coverages to an insured : Please remember that you must do your own work. Any plagiarism will result in a grade of zero for all students involved. Please use your own words even if you are using the textbook for answers. Always provide a citation when a reference is used.
Summarize sympatric speciation and polyploidy methods : Summarize the following three methods that could produce a new species from an existing species and provide examples, in 700 to 1050 words. Include a summary and specific examples:
Potential misuse of reporting discretion : From the perspective of a minority investor in the company's shares, which methods provide better information about the economic performance of Fiat? Summarize the red flags for potential misuse of reporting discretion.
Internet research on the topic of electronic brochures : Student will conduct Internet research on the topic of electronic brochures and brochure development. Student will share various websites found on these topics in the weekly discussion board area.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Mark the following statements as valid or invalid

Mark the following statements as valid or invalid. If a statement is invalid, explain why.

  Design a program that asks for the number of fat grams

Starting out with Programming logic and design 3rd Author Tony Gaddis - Pg 279, PE 3 Fat Grams Calculator

  Determining the advanced programming techniques

Joe has joined FIT technologies recently as a software developer. He is a fresher and does not know advanced programming techniques. To include him in the team that is developing the application, Damien, the Project Manager, decides to conduct a t..

  Write a program using the class as defined

Write a program using` the class as defined below. Put the class definition in a separate header file, and put all the functions' code in a separate Resource file.

  What is special about the point where cp is a maximum

what position along the chord does the minimum pressure occur - what is special about the point where Cp is a maximum?

  What is the best way to output the result of a function

What is the best way to output the result of a function?

  Write program that stores the numbers in array

Write a c++ program that stores the following numbers in the array named miles: 15,22,16,18,27,23, and 20. have your program copy the data stored in miles to another array.

  Function that will accept the three sides of a triangle

Create a function that will accept the three sides of a triangle (a, b, c) as scalar values, calculate the angles that correspond to these sides (alpha, beta, gamma), and return these angles to the function call in the script file.

  Create a funcion called max

Create a funcion called max().

  Packets of her favourite washing powder

She want to write a programme to determine which one of the packets is the best buy (most economical). Do the calculations and display which packet for all three packet.

  Write a modular program in three files

Acts as a cafeteria kiosk, continually prompting the user for a number (1-10) indicating the quality of food at the cafeteria. Input of -1 will stop the polling function, and initiate the reporting functionality which displays a histogram to the u..

  Declare a pointer to an array of 500 school

In a main() demonstration function, declare a pointer to an array of 500 School objects and include code to handle any memory allocation errors that occur. in a loop, declare 500 array objects at a time, continuing to rewrite the main() functions ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd