Suppose you have a programmer-defined data type Data and want to overload the << operator to output your data type to the screen in the form cout << dataToPrint; and allow cascaded function calls. The first line of the function definition would be:

a. ostream &operator<<( ostream &output, const Data &dataToPrint )
b. ostream operator<<( ostream &output, const Data &dataToPrint )
c. ostream &operator<<( const Data &dataToPrint, ostream &output )
d. ostream operator<<( const Data &dataToPrint, ostream &output )

a. ostream &operator<<( ostream &output, const Data &dataToPrint )

Computer Science & Information Technology

You might also like to view...

A filename can contain up to ________ letters or characters

A) 1000 B) 255 C) 8 D) 25

Computer Science & Information Technology

____ determines the number of colors that an image contains.

A. Image resolution B. Color depth C. A vector D. A stylus

Computer Science & Information Technology