如何将类放入二维数组

问题描述:

我使用visual C ++的程序需要3个类,1个用于''item tv'',1个用于''shelf''和另一个''仓库''。 ''item tv''类将更新并显示3个电视的项目编号,描述,成本和数量。货架将捕获物品号。和项目类的3个电视中的任何一个的数量和数量。并询问将项目放在2D数组中的位置。然后它将显示2D数组,累计总数量和成本。仓库类将使用dymanic menory创建一个新地址并显示地址。我将如何....感谢

Hi, my programme using visual C++ need 3 classes, 1 for ''item tv'', 1 for ''shelf'' and the other ''warehouse''. The ''item tv'' class will update and display the item number, description, cost and qty of 3 tv. The shelf will capture the item no. and qty of any of the 3 tv of the "item class " and ask where to put the item in the 2D array. It will then display the 2D array, add up the total qty and the cost. The warehouse class will have a address using dymanic menory to create a new address and display the address. How shall i being....Thank

好吧,如果你在我的 EasyBMP C ++位图库,你会发现像素是ebmpBYTE结构的二维数组:

Well, if you look at the BMP object in EasyBMP.cpp in my EasyBMP C++ bitmap library, you''ll find that the pixels are a 2-D array of ebmpBYTE structs:

展开 | 选择 | Wrap | 行号



您好,我使用visual C ++的程序需要3个类,1个用于''item tv'',1代表''shelf'',另一个''仓库。 ''item tv''类将更新并显示3个电视的项目编号,描述,成本和数量。货架将捕获物品号。和项目类的3个电视中的任何一个的数量和数量。并询问将项目放在2D数组中的位置。然后它将显示2D数组,累计总数量和成本。仓库类将使用dymanic menory创建一个新地址并显示地址。我将如何....感谢
Hi, my programme using visual C++ need 3 classes, 1 for ''item tv'', 1 for ''shelf'' and the other ''warehouse''. The ''item tv'' class will update and display the item number, description, cost and qty of 3 tv. The shelf will capture the item no. and qty of any of the 3 tv of the "item class " and ask where to put the item in the 2D array. It will then display the 2D array, add up the total qty and the cost. The warehouse class will have a address using dymanic menory to create a new address and display the address. How shall i being....Thank



依次实施和测试每个类,即实现和测试电视,当它在工作架上然后仓库等时通过这种方式,您可以构建一个工作系统,在您移动到下一个组件之前,它已经测试并运行了每个组件。

implement and test each class in turn, i.e. implement and test tv, when that is working shelf then warehouse, etc. in this way you build a working system knowning that each component it tested and working before you move to the next.



实现并测试每个类反过来,即实现和测试电视,当工作架,然后仓库等,这样你就建立了一个工作系统,知道它在你移动到下一个之前测试和工作的每个组件。
implement and test each class in turn, i.e. implement and test tv, when that is working shelf then warehouse, etc. in this way you build a working system knowning that each component it tested and working before you move to the next.



我一整天都在看的最佳建议! (并且比我的方式更好!):) - 保罗

Best advice I''ve seen all day! (And way better than mine!) :) -- Paul