搜索
编程论坛
→
开发语言
→
C++论坛
→
『 C++教室 』
→ typedef 和 inline 问题
标题:
typedef 和 inline 问题
取消只看楼主
bclee
等 级:
新手上路
帖 子:23
专家分:0
注 册:2007-9-16
楼主
问题点数:0 回复次数:1
typedef 和 inline 问题
class screen
{ public :
typedef std::string::size_type index;
index get_cursor() const;
};
inline screen::
index screen::
get_cursor() const
{ return cursor;
}
为什么会多出红色部分, 在外部的函数定义上指定inline ,应该也是 inline + 类名::函数名吧?
搜索更多相关主题的帖子:
typedef
inline
2008-01-25 09:09
bclee
等 级:
新手上路
帖 子:23
专家分:0
注 册:2007-9-16
第
2
楼
得分:0
就是说screen::index用法相当于 int 等数据类型 ,只是它规定了这种类型的可见性
inline (screen::index ) screen::get_cursor() const 所以应该这样理解吧
数据 类型 类名 函数
谢谢高人指点!!!
2008-01-25 10:04
2
1/1页
1
参与讨论请移步原网站贴子:
https://bbs.bccn.net/thread-198658-1-1.html
关于我们
|
广告合作
|
编程中国
|
清除Cookies
|
TOP
|
手机版
编程中国
版权所有,并保留所有权利。
Powered by
Discuz
, Processed in 0.013830 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved