Why is this?

You have to #include as well as #include when you use a line of code such as
```
cout << setw(8) << 123456 << endl;
```
but not have to #include when you do the exact equivalent thing in
```
cout.width(8);
cout << 123456 << endl;
```


Use of cout << setw(8) uses a manipulator that is not declared in iostream, but is declared in include iomanip. The member function cout.width(int) is already declared in iostream. There is no need to #include with the use of the member function. Manipulators are more convenient which is why they are provided.

Computer Science & Information Technology

You might also like to view...

A_______ begins with a reference to the first node, and each node contains a reference to the next node.

a) doubly linked list. b) singly linked list. c) circular, singly linked list. d) None of the above.

Computer Science & Information Technology

A variable whose meaning is confined to a method definition is called an/a

(a) instance variable (b) local variable (c) global variable (d) none of the above

Computer Science & Information Technology

Examples of personal computers include all of the following EXCEPT ________

A) gaming systems B) mobile devices C) notebooks D) desktops

Computer Science & Information Technology

Give schedules that demonstrate incorrect executions in each of the following situations. For each situation, give a one sentence explanation of why the execution is incorrect (for example, `The balance in the bank account is incorrect because ...?)

(a) Transactions are not isolated (b) Transactions are not atomic

Computer Science & Information Technology