C++/explain

Advertisement


Question
Would you mind explain the "array of objects" for me?

Thanks!

Answer
Hi there:

  I hope u'll be fine. I'm not sure what to explain as this is pretty much straightforward. An array of objects is just like an ordinary integer array except that instead of data it contains the references to the objects i.e. it contains the address of the corresponding object in memory.
  An array of objects is useful in case when u want to process some objects somehow in the same manner. So that instead of writing down the code for each object seperatly, u just use a for loop and write a generic code only once to process all the objects.
  If u needed to know something more specific, plz. let me know and i'll try to help.

Thanks for contacting me.
Zaigham

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


zaigham

Expertise

I can answer any questions that range from the very basics of c++ to the advanced topics like polymorphism, inheritance, composition, multiple inheritance and templates. I can also answer almost every type of questions about c++ data structures like stack, queue, circular queue, linklist(single, double, circular), binary trees, binary search trees, avl trees, 2-3 and 2-3-4 trees. I dont have much experience of mfc and creating guis in visual c++, so plz. dont ask me questions about that.

Experience

I'm working in c++ since the last 6 years. I've good working skills specially in the advanced topics like inheritance, polymorphism and all type of c++ data structures.

©2016 About.com. All rights reserved.