摘要:
[Header File Dependencies] 什么时候可以用前置声明替代include? 1、当 declare/define pointer&reference 时。 2、当 declare static data member 时。 3、当 declare function 时。 So,下面这段代码会被正常编译通过:#include class Point;struct Square{ Point *pt; Point &ref; static Point point;};void xshow(Point p); void show(){ pri... 阅读全文
posted @ 2013-08-13 16:11
Tekkaman
阅读(321)
评论(0)
推荐(0)
摘要:
[An Insight to References in C++] 引用的本质是常指针。占用的内存和指针一样。 参考:http://www.codeproject.com/Articles/13363/An-Insight-to-References-in-C 阅读全文
posted @ 2013-08-13 15:44
Tekkaman
阅读(211)
评论(0)
推荐(0)
浙公网安备 33010602011771号