PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

confused about strings

Hi, im getting a bit confused about what to do about strings, usually ive just used std::string for string manipulation , but im in the crossplatform international world now,

For this im guessing I should use _TCHAR, but do I need to always use this ie for internal file names? Or is it just used for text that could get displayed to the user

What do you do?
As I do development on a laptop & every so often test on my handheld I use the TCHAR approach throughout. For every regular function there is a _t equivalent so you don't need to worry about #IFDEF stuff except when it comes to file paths.
You can use a std::basic_string<_TCHAR> or similar if you wish.

Of course you don't have to use _TCHAR if you are not going to need the functions that are _TCHAR on Pocket PC. So for example if you are using a text format to store some data, but it isn't user visible or editable, then char works fine.
thanks Conan, mlepage thats cleared it up for me :)



Sorry if im flooding the forums a bit but im sitting here programming all day by myself so issues come up a lot at the beginning