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 *
'\'記号を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";