说明:3、 友元
编写C++程序完成以下功能:
(1) 定义一个Boat和Car两个类,他们都具有私用属性——重量;
(2) 编写一个函数,计算两者的重量和。
double TotalWeight(Boat& b, Car& c)
-3, friend write C++ program to accomplish the following functions: (1) defines two classes of a Boat and Car, they have priva
<billy> 在 2025-11-15 上传
| 大小:1kb | 下载:0