C ++中的继承 [英] Inheritance in C++

查看:117
本文介绍了C ++中的继承的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在C中有一些类似于C ++继承的规定吗?提前谢谢。

Do we have some provision in C similar to inheritance in C++???Thank you in advance.

推荐答案


我们在C中有一些类似于C ++继承的规定吗?提前谢谢你。
Do we have some provision in C similar to inheritance in C++???Thank you in advance.



一般来说,C不是OOP语言(但是你几乎可以像使用它一样使用它),但你应该能够继承结构因为struct只是一个所有成员都公开的类。


Savage

C is not OOP language in general(but with little more effort you can almost use it as if it is),but you should be able to inherit from the struct,because struct is nothing but a class where all members are public.

Savage


如果我没有弄错他的意思是你是允许执行以下操作

If I am not mistaken what he means is that you are allowed to do the following

展开 | 选择 | Wrap | 行号



如果我我没有弄错他的意思是你被允许做什么以下

If I am not mistaken what he means is that you are allowed to do the following

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号


这篇关于C ++中的继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆