About VS2013 after the optimization of the MFC file read failure parsing (debug can, release under the failure)

Source: Internet
Author: User

Tested By:

Error from: The following program, under the VS2010 use getfilename (), the file can be read successfully, but under VS2013, use getfilename () read the file under Debug can, However, after the release fails, instead of getpathname (), it can be compiled successfully.

CFileDialog Filepclouddlg (TRUE);
filepclouddlg.m_ofn.lpstrtitle=_t ("Select Point Cloud File");
filepclouddlg.m_ofn.lpstrfilter=_t ("Text files (*.txt) \0*.txt\0all files (*. *) \0*.*\0\0");
if (Idok==filepclouddlg.domodal ())
{
Icp.msVecSrcPoints.clear (); Emptying the point cloud storage container

//cstring filename = filepclouddlg.getfilename ();//Gets the file name selected by the user
CString fileName = Filepclouddlg.getpathname ();//Get the full path name of the file
Std::ifstream Filepcloud (fileName);
if (!filepcloud)
{
MessageBox (_t ("Unable to open the file!");
}
while (!filepcloud.eof ())
{
filepcloud>>pointcloud;
if (filepcloud.eof ())
{
Break
}
Icp.msVecSrcPoints.push_back (Pointcloud);
}
Filepcloud.close ();
}

About VS2013 after the optimization of the MFC file read failure parsing (debug can, release under the failure)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.