Abstract

A namespace declaration defines a scope, and can therefore be used to prevent name clashes. The namespace feature is required because C++ defines a single global scope namespace outside the scope ofif-else or switch statement blocks, loops, functions and classes. As programs steadily grow in size they correspondingly become more susceptible to name clashes. A large program will consist of numerous function and class library files, and namespaces allow functions and classes to be associated with a scope other than the global file scope. The namespace feature is particularly useful for eliminating name clashes between applications and function and class libraries

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag London Limited 1996

Authors and Affiliations

  • Graham M. Seed
    • 1
  1. 1.Department of Mechanical & Chemical EngineeringHeriot Watt UniversityEdinburghUK

Personalised recommendations