不存在從CString轉const char* 解決方法:
CFileDialog open_dlg(true,0, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,NULL);
CString filepath;if (open_dlg.DoModal() == IDOK)
{
filepath = open_dlg.GetPathName();
}
const char* fpath = CStringA(filepath);
IplImage* src = cvLoadImage(fpath,1);