Chinaunix首页 | 论坛 | 博客
  • 博客访问: 450275
  • 博文数量: 135
  • 博客积分: 4177
  • 博客等级: 上校
  • 技术积分: 1145
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-13 17:16
文章分类

全部博文(135)

文章存档

2011年(5)

2010年(4)

2009年(26)

2008年(25)

2007年(29)

2006年(42)

2005年(4)

分类: C/C++

2008-05-29 16:53:11

 

static CString strcompare[]={"he.xml","hehe.xml"};
    int offset=std::find(strcompare,strcompare+sizeof(strcompare)/sizeof(*strcompare),CString("he.xml"))-strcompare;
    switch(offset)
    {
    case 0:
        {
            COpenexample1 xmlDlg;
            xmlDlg.setFileName(fileName);        
            xmlDlg.DoModal();
            break;
        }
    case 1:
        {
            COpenexample1 xmlDlg;
            xmlDlg.setFileName(fileName);
            xmlDlg.DoModal();
            break;
        }
    default:
        {
            cout << "database is not found you filename!!!"<< "\n";
        }
    }
    if (fDlg.DoModal() == IDOK) //the mean is you check OK button;

    {
        TiXmlDocument doc;
        doc.LoadFile(fDlg.GetPathName());
    }

}

 

出上错误:“__w64 int”转换到“int”,可能丢失数据

解决方式: 关闭 64位的支持!

 

阅读(1035) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~