A="D:\Kursa4\a1\a1\test1.txt";
B="D:\Kursa4\a1\a1\test1.txt";
+ A "D:Kursa411 est1.txt" std::basic_string,std::allocator > + B 0x0046cd0c "D:Kursa411 est1.txt" 字符 *
当我将它分配给 char 或 string 时,'\' 符号未更正。我需要将 '\' 替换为 '/' - 但是当我写 '\' - 表示下面的文本
我以这种格式读取文件的名称。并想将 \ 替换为 /
ZeroMemory(&of, sizeof(OPENFILENAME));
of.lStructSize = sizeof( OPENFILENAME );
of.Flags = OFN_FILEMUSTEXIST| OFN_EXPLORER | OFN_ENABLESIZING;
of.lCustData = (DWORD) NULL;
//of.hwndOwner = hWnd;
of.lpstrFilter = L"*.*";
of.lpstrFile = (LPWSTR)fsFile;
of.nMaxFile = sizeof(fsFile);
of.nFilterIndex = 1;
of.lpstrFileTitle = NULL;
of.nMaxFileTitle = 0;
if(GetOpenFileName(&of) == TRUE)
{
//IDC_EDIT1
//HWND hwndEdit1 = GetDlgItem(hWnd,IDC_RADIO1);
SetWindowText(hwndEdit1, (LPCWSTR)fsFile);
}
我想从“D:/Kursa4/a1/a1/test.txt”制作“D:\Kursa4\a1\a1\test1.txt”
char B = "D:/Kursa4/a1/a1/test.txt";
自制?
char B = "D:\Kursa4\a1\a1\test1.txt";