创建自己的函数类型-结构的成员函数。不是太懂!

创建自己的函数类型-结构的成员函数。不是太懂!请指教!
#include<iostream>
using namespace std;
struct box{
double length;
double width;
double height;
double vol()
{
return height*length*width;
}
};
int main(){
box firstbox={80.0,50.0,40.0};
double firstboxvol=firstbox.vol();
cout<<endl
<<"这个BOX的面积为:"<<firstboxvol<<endl
<<"这个BOX的长为:"<<firstbox.length<<endl
<<"这个BOX的宽为:"<<firstbox.width<<endl
<<"这个BOX的高为:"<<firstbox.height<<endl;
box twobox=firstbox;
twobox.height*=1.1;
twobox.length*=1.1;
twobox.width*=1.1;
cout<<endl
<<"第二个BOX的面积为:"<<twobox.vol()<<endl
<<"第二个BOX的长为:"<<twobox.length<<endl
<<"第二个BOX的宽为:"<<twobox.width<<endl
<<"第二个BOX的高为:"<<twobox.height<<endl;
cout<<"盒子尺寸每增加20%,体积就增加:"<<(vol(twobox)-vol(firstbox))*100.0/vol(firstbox)<<"%";
return 0;
}


按照书上这样编写程序。但是一直提示错误。实在无解。。

------解决方案--------------------
error C2065: 'vol' : undeclared identifier

vol是个成员函数,要用对象去访问吧
------解决方案--------------------
vol(twobox)-vol(firstbox) 怎么能这么调用vol函数?


firstbox.vol()
twobox.vol()