开发者

TCHAR end of line character

开发者 https://www.devze.com 2022-12-24 01:18 出处:网络
int DownloadFtpDirectory(TCHAR* DirPath) { WIN32_FIND_DATA FileData; UINT a; TCHAR* APP_NAME = TEXT(\"ftpcli\");
int DownloadFtpDirectory(TCHAR* DirPath) { 
WIN32_FIND_DATA FileData;  
UINT a; 
TCHAR* APP_NAME = TEXT("ftpcli"); 
TCHAR* f;
int j = 5;
do {
  j++;
  f = _tcsninc(DirPath, j);
}while (_tcsncmp(f, TEXT("/"), 1));
TCHAR* PATH_FTP = wcsncpy(new TCHAR[j], DirPath, j);

A开发者_如何学Pythonfter the last line gets a string in which there is no line ending character, how to fix this? P.S. how to do so would be out of line "ftp://ftp.microsoft.com/bussys/", get a string ftp.microsoft.com if both strings are TCHAR ?


TCHAR* PATH_FTP = wcsncpy(new TCHAR[j+1], DirPath, j);
PATH_FTP[j] = TEXT('\0');
0

精彩评论

暂无评论...
验证码 换一张
取 消