what is the mean of function ?

what is the mean of function ?

题目
what is the mean of function ?
I want to know something about function in c++,and how to use it in programming !
especially in function overload!
help!
答案
A class may have several constructors, for example:
class myClass {
//constructor 1
myClass(int nx,int ny, int size){ c = nx * ny;};
//constructor 2
myClass(int nx,int ny, int nz, int size){ c = nx * ny * nz;};
.
}
When you generate instances of myClass, you may use:
myClass d2,d3;
d2.myClass(nx,ny,c);
d3.myClass(nx,ny,nz,c);
or use
d2.myClass(nx,ny,c);
.
b = a / c;
d2.myClass(nx,ny,nz,c);
.
b = a / c;
the later 2 d2.myClass() are "function overload",
one with 3 parameters and another with 4 parameters
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
热门考点

超级试练试题库

© 2017-2019 超级试练试题库,All Rights Reserved.