这个函数结构怎么理解inline void* CSimpleList::GetNext(void* preElement) const{ return *GetNextPtr(preElement); }我最不能理解的就是 const 放在那个位置是什么意思

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/09 05:59:27
这个函数结构怎么理解inline void* CSimpleList::GetNext(void* preElement) const{ return *GetNextPtr(preElement); }我最不能理解的就是 const 放在那个位置是什么意思

这个函数结构怎么理解inline void* CSimpleList::GetNext(void* preElement) const{ return *GetNextPtr(preElement); }我最不能理解的就是 const 放在那个位置是什么意思
这个函数结构怎么理解
inline void* CSimpleList::GetNext(void* preElement) const
{ return *GetNextPtr(preElement); }
我最不能理解的就是 const 放在那个位置是什么意思

这个函数结构怎么理解inline void* CSimpleList::GetNext(void* preElement) const{ return *GetNextPtr(preElement); }我最不能理解的就是 const 放在那个位置是什么意思
一般加那个const的函数都是读取内容的函数
被const修饰的成员函数,表明他不会修改任何成员变量,仅仅会读.
象标准库里面所有的get函数都是const的