| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 964 人关注过本帖
标题:编译不提示出错,运行出现abnormal program termintion .
取消只看楼主 加入收藏
lisypro
Rank: 4
等 级:业余侠客
威 望:3
帖 子:695
专家分:216
注 册:2005-9-25
结帖率:33.33%
收藏
 问题点数:0 回复次数:2 
编译不提示出错,运行出现abnormal program termintion .

编译不提示出错,运行出现abnormal program termintion .
原程序如下
// cf.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "cf.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// The one and only application object

CWinApp theApp;

using namespace std;

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
int nRetCode = 0;

// initialize MFC and print and error on failure
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
{
// TODO: change error code to suit your needs
cerr << _T("Fatal Error: MFC initialization failed") << endl;
nRetCode = 1;
}
else
{
// TODO: code your application's behavior here.
CString strTemp;
CFile mFile;
cout <<"1sd";
if(mFile.Open("d:\\1.txt",CFile::modeRead)==0)
{
cout <<"sd";
return 0;
}

CArchive ar(&mFile,CArchive::load);
ar >> strTemp;//本语句处 出错,但编译不出错。
cout << "22";//本语句未能正常输出


ar.Close();
mFile.Close();
cout << strTemp;
}

return nRetCode;
}

搜索更多相关主题的帖子: program abnormal termintion 编译 运行 
2006-03-06 09:40
lisypro
Rank: 4
等 级:业余侠客
威 望:3
帖 子:695
专家分:216
注 册:2005-9-25
收藏
得分:0 
没人会么

长期承接管理系统
代做各种vb/ / vc小程序
QQ:82341763
手机:13623290828
群号 11619730
2006-03-07 14:34
lisypro
Rank: 4
等 级:业余侠客
威 望:3
帖 子:695
专家分:216
注 册:2005-9-25
收藏
得分:0 

楼上的如果感兴趣可以自己调 一下


长期承接管理系统
代做各种vb/ / vc小程序
QQ:82341763
手机:13623290828
群号 11619730
2006-03-14 15:03
快速回复:编译不提示出错,运行出现abnormal program termintion .
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011832 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved