| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
内详In Reply To:OK搞定了,多谢大哥们,顺便问一下如何在一个CLASS里加如OPERATOR啊 Posted by:uni at 2005-12-11 18:50:55 > 比如
>
> STRUCT KK
> {
> ....
>
>
> }
>
> 我想在这个KK里面定义 DOUBLE + KK这个怎么做呢
1。KK + KK 对应
KK operator + (KK&)
2。KK + double 对应
KK operator + (double)
3。double + KK 对应
friend operator + (double, KK)
这是小弟知道的,希望对大哥有帮助。
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator