现实生活中的例子 [英] real life example

查看:107
本文介绍了现实生活中的例子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

plzz给我这些问题的答案


1在现实世界中给出虚拟函数和纯虚函数的例子

2给出函数重载的例子在现实世界中

3写下switch语句的结构。

thanx

解决方案

dost写道:

plzz给我这些问题的答案

1在现实世界中给出虚拟功能和纯虚拟功能的例子
2举例现实世界中的函数重载
3写开关语句的结构。




这些不是问题。

dost写道:

plzz给我这些问题的答案

1在现实世界中给出虚拟功能和纯虚拟功能的例子
2给现实世界中函数重载的例子
3写出switch语句的结构。
thanx


Plzz做自己的功课:

http://parashift.com/c++-faq-lite/ho...t.html#faq-5.2


如果你无法弄明白,我肯定谷歌可以提供帮助。


干杯! --M




dost写道:

plzz给我这些问题的答案

1在现实世界中给出虚拟函数和纯虚函数的例子


virtual int main(){return new int(0);
pure virtual int main(){return virtual int(0); }

2给出现实世界中函数重载的例子


void function(int x){cout<< X; }


....

int y,b,q; char * x;


//重载函数调用

函数(y,b,q,x);

3写switch语句的结构。


开关(测试){

案例1,2,34:

doX();

继续;

案例4,5,6:

doY();

继续;

案例否则:

doDefaultAction();

}

thanx




没问题。确保你的朋友也得到副本。


plzz give me the answer of these question

1 Give exmples of virtual func and pure virtual func in real world
2 Give example of function overloading in real world
3 Write the structure of switch statement.
thanx

解决方案

dost wrote:

plzz give me the answer of these question

1 Give exmples of virtual func and pure virtual func in real world
2 Give example of function overloading in real world
3 Write the structure of switch statement.



These are not questions.


dost wrote:

plzz give me the answer of these question

1 Give exmples of virtual func and pure virtual func in real world
2 Give example of function overloading in real world
3 Write the structure of switch statement.
thanx



Plzz do your own homework:

http://parashift.com/c++-faq-lite/ho...t.html#faq-5.2

If you can''t figure it out, I''m sure Google can help.

Cheers! --M



dost wrote:

plzz give me the answer of these question

1 Give exmples of virtual func and pure virtual func in real world
virtual int main() { return new int(0); }

pure virtual int main() { return virtual int(0); }
2 Give example of function overloading in real world
void function(int x) { cout << x; }

....
int y, b, q; char * x;

// overloading function call
function(y, b, q, x);
3 Write the structure of switch statement.
switch(test) {
case 1, 2, 34:
doX();
continue;
case 4, 5, 6:
doY();
continue;
case else:
doDefaultAction();
}
thanx



No problem. Make sure your friends get copies too.


这篇关于现实生活中的例子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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