what is the mean of function ?
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/21 23:56:54
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!
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
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
what is the mean of function ?
What is the function of NADH?
What is the function of menu?
What is the basic function of paging
what is the function of music
What Is The Mean Of The Yonkers.
What is the mean of the world?
what is the mean of the last
what is the function of [peptidoglycan of a eubacteria]
WHAT IS THE MEAN OF TRANSFER PRICES?
What Is The Mean Of "GOOD Music"?
What is the mean of "John Bull"