#include <iostream>
using namespace std; struct box {
char maker[40];
float height;
float width;
float length;
float volume;
}; void displayBox(const box b);
void setVolume(box * b); int main() {
box b = {"abc", 3, 4, 5, 0};
setVolume(&b);
displayBox(b);
return 0;
} void displayBox(const box b) {
cout << "maker: " << b.maker << endl;
cout << "height: " << b.height << endl;
cout << "width: " << b.width << endl;
cout << "length: " << b.length << endl;
cout << "volume: " << b.volume << endl;
} void setVolume(box * b) {
b->volume = b->length*b->width*b->height;
}

  

最新文章

  1. 使用UIKit制作卡牌游戏(一)ios游戏篇
  2. WWDC2014总结---For产品经理们
  3. springmvc下上传文件
  4. ios多语言设置,操作
  5. 【原】linux系统运维工具必备
  6. typedef和自定义结构体类型
  7. WCF开发时如何选择正确的实例模式(InstanceMode)?
  8. hdu 1063 Exponentiation (高精度小数乘法)
  9. NOI十连测 第六测 T3
  10. php数组操作小结
  11. bootstrap之DumpWindowHierarchy
  12. Ubuntu下OpenCV不能被某个python版本识别
  13. Scrapy框架-Spider
  14. Oracle中的substr()函数 详解及应用
  15. monit检测语法
  16. python练习题-day8
  17. Java MongoDB
  18. 简易扩展Visual Studio UnitTesting支持TestMethodCase
  19. 超炫jQuery测试答题功能
  20. Apache2.4配置(全)

热门文章

  1. Apache配置https启动不了的解决办法
  2. mybits like查询写法
  3. iOS开发 - CocoaPods的常见使用方式
  4. [題解]luogu_P1854 花店櫥窗佈置
  5. 洛谷 P3830 [SHOI2012]随机树
  6. Django的ORM基础增删改查
  7. HTML 5的革新——语义化标签(一)HTML 5的革新——语义化标签(二)
  8. js实现屏幕自适应局部
  9. 【转】java的动态代理机制详解
  10. thinkphp分页集成