- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could someone explain the rationale behind using pxcCHAR to store hand and finger data?
It proves tricky to work around pxcCHAR instead of just CHAR, but if there's a good reason... I'm all for it.
I'm about to convert an array of type pxcCHAR to a dynamically sized array. Any explanations of pxcCHAR would be helpful.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
pxcCHAR is a typedef for wchar_t.
Wide characters (wchar_t) are used to support languages with more than 256 characters. Whereas char = 8bit = 256 character limit.
wchar_t size is compiler dependent so be careful when allocating dynamic arrays.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!
Here's the reason for thinking about creating a dynamic array:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would use an STL container like a vector and push data onto it. Then I would clear it when the data is no longer needed.
If you allocate your own data structure, remember that pxcCHAR is a wide character with compiler dependent size. So if you need to figure out how much memory your structure is consuming you have to do:
int size = sizeof(buffer)/sizeof(pxcCHAR)
where buffer is your pxcCHAR array.
Good Luck

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page