<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>namespace on adolsai's echo</title><link>https://adolsai.com/tag/namespace/</link><description>Recent content in namespace on adolsai's echo</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Wed, 26 Feb 2014 23:03:54 +0800</lastBuildDate><atom:link href="https://adolsai.com/tag/namespace/index.xml" rel="self" type="application/rss+xml"/><item><title>namespace</title><link>https://adolsai.com/archives/13.html</link><pubDate>Wed, 26 Feb 2014 22:42:00 +0800</pubDate><guid>https://adolsai.com/archives/13.html</guid><description>&lt;p&gt;sb的我居然一直都没有用过这个东西...&lt;/p&gt;&#10;&lt;p&gt;度娘&#10;命名空间是用来组织和重用代码的编译单元。如同名字一样的意思，NameSpace（名字空间），之所以出来这样一个东西，是因为人类可用的单词数太少，并且不同的人写的程序不可能所有的变量都没有重名现象，对于库来说，这个问题尤其严重，如果两个人写的库文件中出现同名的变量或函数(不可避免)，使用起来就有问题了，为了解决这个问题，引入了名字空间这个概念，通过使用 namespace xxx；你所使用的库函数或变量就是在该名字空间中定义的，这样一来就不会引起不必要的冲突了。&lt;/p&gt;</description></item></channel></rss>