PocketMatrix forums

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

C++ GapiDraw Query

Hello

how do you convert from an

unsigned short to const char *, (_TCHAR to char *). I'm trying to use fopen in a GapiDraw app.
Use mbstowcs( ) or wcstombs( ) to convert back and forth between wide chars and chars.
Use the TCHAR equivalent _tfopen.

By using the TCHAR functions it allows you two swap easilly between single byte and Unicode.

see:
http://msdn.microsoft.com/library/defau ... wfopen.asp

remember:
Code:

#ifdef UNICODE
#define TCHAR char
#else
#define TCHAR short
#endif