I am currently attempting to teach myself C++ so I don't have the benefit of a prof or TA. The question at the end of the chapter that I'm working on wants me to create an array of structures and to initialize the array of structures using the new function. So essentially, I have to create an array of structures and use a pointer to point to it, but here is my question. How do you reference an element of the array. The book only gives examples where it does something like this
pt->structureElmeent
or
(*pt).structureElement
When I try to do pt[2]->structureElement
or
(*pt[2]).structureElement
I get an error. I can post my actual code, but I'm more interested in learning the actual syntax rules for this. Any help would be greatly appreciated.