Redian新闻
>
CACF mayoral control meeting‏ on Nov. 21.08
avatar
q*2
2
I have two class A and B as fllowing
class A {
public:
int i;
public:
A() : i(1) { }
};
class B : public A {
public:
int i;
public:
B() : A(), i(2) { }
};
A has data i, B has a new data i, in fact B has two int numbers. I want to
know how to use the i defined in A with a B object.
Thanks a lot.
avatar
L*k
3
Hope all is well! CACF is having a meeting that we hope to have ASAP alumni
representation for around mayoral control in schools and the role of APA
parents and students. Join us to learn about the school system and what you
can do:
Why don’t parents and students have a voice in schools?
Who controls the NYC Public Schools?
· Learn about Mayoral Control and how decisions are made about
education funding and policies that impact schools
· Share your experiences with public schoo
avatar
t*t
4
write A::i, then

【在 q****2 的大作中提到】
: I have two class A and B as fllowing
: class A {
: public:
: int i;
: public:
: A() : i(1) { }
: };
: class B : public A {
: public:
: int i;

avatar
q*2
5
Just figure out
b.A::i
b.B::i
Thanks

【在 t****t 的大作中提到】
: write A::i, then
avatar
d*y
6
why do u both name them "i"?

【在 q****2 的大作中提到】
: Just figure out
: b.A::i
: b.B::i
: Thanks

avatar
d*n
7
avatar
d*n
8
Guess you want to define a virtual function.
avatar
l*a
9
this is name hiding
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。