ǰλ: ҳ > > C++ >

C++ѧϰժҪ̳֮к

ʱ:2011-10-20 csdn laoduan_78

̳ҪĻ֮һ

1̳еĸ

ν̳ inheritanceеͶµ͡

ڼ̳йϵУ̳еΪ ࣨbase class̳࣬ͨйϵ򱻳Ϊࣨderived class

ȿԶԻʽչֿԶԻƣӶõõĿ ģ飬˳Ŀʱ䡣

һȿԴһҲԴӶ һΪ̳УӶΪؼ̳С

̳еĶ ʽ£

class ʷʽ

{

е³Ա

}

У¶dzеһࡣ

ڵ̳Уÿ ж࣬ÿֻһࡣ

2ؼ̳

νؼ̳ ָӶġ

ؼ̳ķʽ£

class ʽ 1ʷʽ 2……

{

е³Ա

}

Ӷʽؼ̳뵥̳еҪǶؼ̳еĻһ