| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 622 人关注过本帖
标题:[讨论]问问题
只看楼主 加入收藏
W649897
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2006-11-26
收藏
 问题点数:0 回复次数:2 
[讨论]问问题
这是什么问题呀
ox00407538指令引用的内存0xcccccccc.该内存不能为written
这个错误怎么解释呀
搜索更多相关主题的帖子: 内存 written 指令 解释 
2006-12-11 20:32
W649897
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2006-11-26
收藏
得分:0 

这是内容:

Loaded symbols for 'E:\temp\chapter7\Debug\chapter7.exe'
Loaded 'C:\WINDOWS\system32\ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\lpk.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\usp10.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\apphelp.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.
The thread 0xEC4 has exited with code 0 (0x0).
The thread 0x8DC has exited with code -1073741819 (0xC0000005).
The program 'E:\temp\chapter7\Debug\chapter7.exe' has exited with code -1073741819 (0xC0000005).

2006-12-11 20:36
W649897
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2006-11-26
收藏
得分:0 

代码:
#include<iostream>
#include<fstream>
void test(int len,int& i,bool& bo);
void test1(char answer1[],int &j,bool& bo);
void getscore(char answer[],char answer1[],bool bo,int &sco);

using namespace std;

int main()
{
ifstream indata;
ofstream outdata;

indata.open("exams.txt");
outdata.open("scores.txt");

char answer[21],answer1[30];
char* id;
indata>>answer;
while(indata)
{indata>>id;
indata>>answer1;
bool bo=true,bo1=true;
int i=0,j=0,sco,d;
int len;
for(d=0;d<30&&bo1;d++)
if(answer1[d]!='\0')
len++;
else
bo1=false;
test1(answer1,j,bo);
test(len,i,bo);
getscore(answer,answer1,bo,sco);
outdata<<id<<" ";
if(i==1)
cout<<"Too many answer s";
if(i==2)
cout<<"Too few answer ";
if(j==1)
cout<<"Invalid answers ";
if(bo)
cout<<sco;
cout<<endl;
}
return 0;
}
void test(int len,int& i,bool& bo)
{
if(len<20)
{
bo=false;
i=2;
}
if(len>20)
{
i=1;
bo=false;
}
}
void test1(char answer1[],int &j,bool& bo)
{
for(int k=0;k<20;k++)
if(!(answer1[k]>='a'&&answer1[k]<='f'))
{
j=1;
bo=false;
}
}
void getscore(char answer[],char answer1[],bool bo,int &sco)
{
if(bo)
for(int k=0;k<20;k++)
if(answer1[k]==answer[k])
sco++;
}


2006-12-11 20:36
快速回复:[讨论]问问题
数据加载中...
 
   



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

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