由买买提看人间百态

topics

全部话题 - 话题: py1
(共0页)
L*******e
发帖数: 114
1
来自主题: JobHunting版 - C++ protected base class
Here is the code snippet from C++ programing language book. What confused me
is the statement "px = py2", the book says an error "we do not know that
py2 is a Z2 or how Y2::x is used in an non-Z2 object", but g++ did not
complain.
Did I misread something?
class X{
public:
int a;
};
class Y1 : public X {};
class Y2 : protected X {};
class Y3 : private X {};
class Z2 : public Y2 {
void f(Y1* py1, Y2* py2, Y3* py3)
{
X *px = py1; // X is a public base of Y1
py1->a = 7
s*******e
发帖数: 664
2
☆─────────────────────────────────────☆
zlike (最终幻想) 于 (Fri Sep 11 05:30:54 2009, 美东) 提到:
The C++ Programming language, 3rd edition, pp.851那个例子,没搞明白。
网上的errata有这个部分,但是跟我书上是一样的
http://www.research.att.com/~bs/3rd_printing15.html
大致是这样子:
class X
{
public:
int a;
};
class Y1:public X{};
class Y2:protected X {};
class Y3:private X {};
class Z2:public Y2{void f(Y1*, Y2*, Y3*);};
void Z2::f(Y1* py1, Y2* py2, Y3* py3)
{
X* px = py1;
py1->a = 7;
px=this;
a=7;
px=py2;   //这两行
d*******e
发帖数: 8
3
来自主题: NanoST版 - a paper
哪个大虾的学校有这个文章呀?谢谢 w********[email protected]
EPL, 77 (2007) 44005
DOI: 10.1209/0295-5075/77/44005
3D aggregation of wet fibers
C. Py1, R. Bastien1, J. Bico1, B. Roman1 and A. Boudaoud2
r********r
发帖数: 352
4
来自主题: Pharmacy版 - 我今天真是太闲了,问个问题吧
我们这边CVS是 PY1 $12/hr,每年长一刀。四年级毕业后,没考到正式执照之前可能是
20多/hr
walgreen好像是比CVS多5毛钱。
(共0页)