#include<iostream>
using namespace std;
class car;
class boat[
private:
int weight;
public:
boat(int weight)
(this->weight=weight;
friend int gettotalweight(boat &b,car &c);
class carf
private:
int weight;
public:
car(int weight)
this->weight=weight;
friend int gettotalweight(boat &b,car &c);
int gettotalweight(boat &b,car &c)
(return b.weight+c.weight;
int main()
boat b(3);
car c(2);
cout<<"总重量是:"<<gettotalweight(b,c)<<endl;
return 0;