What problem does the namespace feature solve?

Author Topic: What problem does the namespace feature solve?  (Read 443 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 139
  • Karma: 0
    • No Addiction
What problem does the namespace feature solve?
« on: 02-15-2016, 04:00:38 »
Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The namespace feature surrounds a library's external declarations with a unique namespace that eliminates the potential
for those collisions.

Quote
namespace [identifier] { namespace-body }

A namespace declaration identifies and assigns a name to a declarative region.The identifier in a namespace declaration must be unique in the declarative region in which it is used. The identifier is the name of the namespace and is used to reference its members.


 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1333 Views
Last post 01-25-2013, 05:09:07
by alia2203
2 Replies
2369 Views
Last post 11-13-2013, 04:55:48
by webseomall
8 Replies
2088 Views
Last post 10-17-2016, 10:16:41
by pablohunt2812
0 Replies
379 Views
Last post 01-23-2016, 01:44:28
by chinmay.sahoo
0 Replies
320 Views
Last post 07-26-2016, 08:03:52
by The_Solver