Groups
Sign in
Groups
Programmer Cafe
Conversations
About
Send feedback
Help
C++中的一个很菜的问题
0 views
Skip to first unread message
shanheyijiu
unread,
Jan 13, 2006, 12:28:53 AM
1/13/06
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Programmer Cafe
我是一个C++的初学者,在类的定义中有这么一段代码:
1、private:
2、int x;
3、int y;
4、public:
5、point(int xx=0,int yy=0):x(xx),y(yy) { } ;
6、friend int inrect(const point&,const rect&);
7、......
其中第5行的冒号(:)是什么意思啊?还有第6行的"&"符号是什么意思?
哪位大哥能指教一下。
Stone Jiang
unread,
Jan 13, 2006, 2:27:26 AM
1/13/06
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to program...@googlegroups.com
: 表示构造函数后面对成员变量进行初始化;
"&" 表示形参为引用
在06-1-13,
shanheyijiu
<
shanh...@126.com
> 写道:
--
Yours,
Stone Jiang
gTalk:
200...@gmail.com
Reply all
Reply to author
Forward
0 new messages