How to convert string to TCHAR * in VC ++?
Thanks.
I decided to use it (TCHAR *) str.c_str ()
If your project is Unicode, you need MultiByteToWideChar . Otherwise, just use str.c_str();
MultiByteToWideChar
str.c_str();
#include <atlstr.h> String dir="hello world"; char * data = new char[dir.size() + 1]; copy(dir.begin(), dir.end(), data); data[dir.size()] = '\0'; USES_CONVERSION; TCHAR* directory = A2T(data);
Source: https://habr.com/ru/post/1342271/More articles:View @ suppressed errors in php - phpCan we enter the pin with FTP data - puttyMagento Headers Already Submitted - magentoExport all my emails from your Gmail account as xml - emailIncluding CSS file in TYPO3 Backend? - cssHow to host multiple sites in Tomcat? - tomcatHINSTANCE for HWND - c ++Is there a way to set what is returned when a variable is requested? - c #subtle difference in using xargs and xargs -i - bashHow to define and use boost :: function with "optional arguments"? - c ++All Articles