- 3
- 0
- 约7.38千字
- 约 35页
- 2018-06-07 发布于浙江
- 举报
面向对象程序的设计概论
1.6 Visual C++程序运行步骤 一、打开Visual C++开发环境主窗口 二、创建一个空的项目 菜单命令:File / New 选项卡:Projects / Win32 Console Application Location:指定路径 Project Name:指定项目名称 三、建立源程序文件 菜单命令:Project / Add to Project / New 选中C++ Source File,指定文件名后单击OK 四、存盘运行 File / Save Build, Execute programm ******面向过程解法: #includeiostream.h struct animal { int weight; int feet; }; int main(){ animal dog1,dog2,chicken; dog1.weight=15; dog2.weight=37; chicken.weight=3; dog1.feet=4; dog2.feet=4; chicken.feet=2; coutThe weight of dog1 is dog1.weightendl; coutThe weight of dog2 is dog2.
原创力文档

文档评论(0)