OOP presentation.pptVIP

  • 4
  • 0
  • 约1.18万字
  • 约 79页
  • 2017-03-28 发布于江苏
  • 举报
OOP presentation

* * * * * * * * * * * * * * * Arrays of Objects Objects can be the elements of an array: InventoryItem inventory[40]; Default constructor for object is used when array is defined Arrays of Objects Must use initializer list to invoke constructor that takes arguments: InventoryItem inventory[3] = { Hammer, Wrench, Pliers }; Arrays of Objects If the constructor requires more than one argument, the initializer must take the form of a function call: Arrays of Objects It isnt necessary to call the same constructor for each object in an array: Accessing Objects in an Array Objects in an array a

文档评论(0)

1亿VIP精品文档

相关文档