IT-Consultant: James C. Fuller > Discussion

Address UNICODE 64-bit VS2015

<< < (10/10)

Frederick J. Harris:
In the above CVector Class code I initially set the size of the underlying array to 10.  But when it hits that it doubles the buffer to accomodate pushes 10 through 19.  Then it bumps it up again to accomodate pushes 20 to 25.  So its infinitely (within reason) growable as a container with constant time pushes.

James C. Fuller:
Fred,
  While that is indeed interesting I still am not able to figure out how to access from my demo above.

James

Frederick J. Harris:
Let me look at that.  It involves the crazy angle brackets at the end of the expression.  I have a doctors appt in a bit and might not get back until later.

Frederick J. Harris:
Had to use the getptr() member to get it to work...


--- Code: ---AeDynArray<AddressType>* pAddArray = new AeDynArray<AddressType>;   // 399,872
...
...
pAddArray->Add(Address);
...
...
AddressType* pAdd=(AddressType*)pAddArray->getptr();
 _tprintf(_T("%s\n"),pAdd[4].Company);

--- End code ---

James C. Fuller:
Fred,
  Not quite.
I did some more surfing and found the answer I think. It works anyway whether it's politically correct or not :)
James


 _tprintf(_T("%ls\n"),(*AddArrayPtr)[2].CityName);


Navigation

[0] Message Index

[*] Previous page

Go to full version