Author Topic: Address UNICODE 64-bit VS2015  (Read 14806 times)

0 Members and 1 Guest are viewing this topic.

Offline Frederick J. Harris

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 942
    • Frederick J. Harris
Re: Address UNICODE 64-bit VS2015
« Reply #45 on: January 23, 2017, 03:41:15 PM »
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.

Offline James C. Fuller

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 674
Re: Address UNICODE 64-bit VS2015
« Reply #46 on: January 23, 2017, 04:25:34 PM »
Fred,
  While that is indeed interesting I still am not able to figure out how to access from my demo above.

James

Offline Frederick J. Harris

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 942
    • Frederick J. Harris
Re: Address UNICODE 64-bit VS2015
« Reply #47 on: January 23, 2017, 04:31:17 PM »
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.

Offline Frederick J. Harris

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 942
    • Frederick J. Harris
Re: Address UNICODE 64-bit VS2015
« Reply #48 on: January 23, 2017, 05:50:31 PM »
Had to use the getptr() member to get it to work...

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

Offline James C. Fuller

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 674
Re: Address UNICODE 64-bit VS2015
« Reply #49 on: January 23, 2017, 06:58:10 PM »
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);