Use std:: with Standard Library Components in Headers

Throughout the header (Fig. 3.9), we use std:: when referring to string (lines 11, 18, 24 and 37), cout (line 33) and endl (line 34). For subtle reasons that we’ll explain in a later chapter, headers should never contain using directives or using declarations (Section 2.6).

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.