默认实参运行结果有乱码,怎么回事??
#include<iostream.h>
int main(int argc, char* argv[])
{int boxvolume(int length=1,int width=1,int hight=1);
cout<<"The default box volume is"<<boxvolume();
cout<<"\n\nThe volume of a box with length 10,\n"
<<"width 1 and height 1 is: "<<boxvolume(10);
cout<<"\n\nThe volume of a box with length 10,\n"
<<"width 5 and height 1 is: "<< cout<<boxvolume(10,5);
cout<<"\n\nThe volume of a box with length 10,\n"
<<"width 5 and height 2 is: "<< cout<<boxvolume(10,5,2)<<endl;
}
int boxvolume(int length,int width,int hight)
{
return length*width*hight;
}