在C++11中typedef是非法的
要名别名用using
例如:
template<class ElemType> using Position=myNode<ElemType>*;
C++11中typedef的替代:using关键字
在C++11标准中,使用typedef创建类型别名是不推荐的,取而代之的是using关键字。例如,定义一个模板类型的别名可以这样写:`template<typenameElemType>usingPosition=myNode<ElemType>*;`这样做使得代码更现代且易于理解。
在C++11中typedef是非法的
要名别名用using
例如:
template<class ElemType> using Position=myNode<ElemType>*;
1万+

被折叠的 条评论
为什么被折叠?