I am trying to add two slashes "\" to the end of a TCHAR buffer[] using wsprintf() in my Win32 C++ app. The variable "buffer" holds a file path: C:\Users\nayub\Desktop\Folder1\Hello. I want to add two slashes to the end of this file path so did the following code:
wsprintf(filename_buff, buffer, L"\\");
MessageBox(hWnd, filename_buff, L"New Folder Directory", MB_OK | MB_ICONINFORMATION);
However, the messagebox displays "C" and nothing else. I'm not sure why it is getting "C" and not the file path because before the slashes are added, the file path prints out correctly.