命名空间别名namespace TV=Television;应该加在哪个位置?

tjhgltt 2008-05-05 08:49:50

using namespace std;
#include <string>
#include <cmath>
1
namespace Television{2...}
3
...全文
83 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
taodm 2008-05-06
  • 打赏
  • 举报
回复
编译试一下不就知道了。so懒?
ForestDB 2008-05-06
  • 打赏
  • 举报
回复
3

below from MSDN:
Namespace Alias
A namespace-alias is an alternative name for a namespace.

Syntax

namespace-alias :

identifier

namespace-alias-definition :

namespace identifier = qualified-namespace-specifier;

qualified-namespace-specifier :

::opt nested-name-specifieropt class-or-namespace-name

A namespace-alias-definition declares an alternate name for a namespace. The identifier is a synonym for the qualified-namespace-specifier and becomes a namespace-alias. For example:

namespace a_very_long_namespace_name { ... }
namespace AVLNN = a_very_long_namespace_name;
// AVLNN is now a namespace-alias for a_very_long_namespace_name.

A namespace-name cannot be identical to any other entity in the same declarative region. In addition, a global namespace-name cannot be the same as any other global entity name in a given program.
帅得不敢出门 2008-05-06
  • 打赏
  • 举报
回复
第一次见
jieao111 2008-05-05
  • 打赏
  • 举报
回复
第一次听说别名。。sc
iu_81 2008-05-05
  • 打赏
  • 举报
回复
3

33,311

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧