Explain how to include a header file in cin and cout program.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.1: Basic Loop Structures
Problem 2E
icon
Related questions
Question

Explain how to include a header file in cin and cout program.

Expert Solution
Step 1

Include the header file in “cin” and “cout” program:

  • To use “cin” and “cout” in a program, the program must include the header file “iostream”.
  • This header file contains the definition of the input and output stream objects, “cin” and “cout”.
steps

Step by step

Solved in 2 steps

Blurred answer