c++ beginner 的菜鸟问题
登录 | 论坛导航 -> 华新鲜事 -> 求学狮城 | 本帖共有 6 楼,当前显示第 5 楼 : 从楼主开始阅读 : 本帖树形列表 : 返回上一页
作者:Yup (等级:3 - 略知一二,发帖:858) 发表:2003-02-21 12:24:58  5楼  评分: 
i think you also have to put inline in class defclass Datalist { .............. inline int getMonth() const; .............. } but normally if I have simple function and want to make it inline. I prefer write mathod body in class def class Datalist { .............. inline int getMonth() const {return month;} .............. }
Why need do this?
The example in MSDN is just like:

class Datalist {
..............
int getMonth() const;
..............
}


inline int Datalist::getMonth() const
{
...
}

Put your OWN COOL signature here!
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表

本帖共有 6 楼,当前显示第 5 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>



请登录后回复:帐号   密码