Abstract
Namespaces are used to avoid naming conflicts by allowing entities, such as classes and functions, to be grouped under a separate scope. In the example below there are two classes that belong to the global scope. Since both classes share the same name and scope the code will not compile.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Mikael Olsson
About this chapter
Cite this chapter
Olsson, M. (2015). Namespaces. In: C++ 14 Quick Syntax Reference. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1727-6_22
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1727-6_22
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1726-9
Online ISBN: 978-1-4842-1727-6
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)