0x0F19B7EC (ucrtbased.dll)处(位于 ex6.exe 中)引发的异常: 0xC0000005: 写入位置 0x00740000 时发生访问冲突。...
下面的代码在编译,运行时没有问题,在输入内容是出现异常如下:
0x0F19B7EC (ucrtbased.dll)处(位于 ex6.exe 中)引发的异常: 0xC0000005: 写入位置 0x00740000 时发生访问冲突。
#include "stdafx.h"
#include <conio.h>
#include <stdio.h>
int main()
{
int NUM, I;
struct STUDENT
{
char NAME[30];
int AGE;
char ID[10];
};
struct STUDENT STD[100];
_cprintf("\nHow many student do you have ? Input the nuber;");
scanf_s("%d", &NUM);
for (I = 1; I <= NUM; I++)
{
_cprintf("\nInput student %d -- name:", I);
scanf_s("%s", &STD[I - 1].NAME);
_cprintf("\nInput student %d -- age:", I);
scanf_s("%d", &STD[I - 1].AGE);
_cprintf("\nInput student %d -- ID:", I);
scanf_s("%s", &STD[I - 1].ID);
}
_cprintf("\nTo see the RESULT,Press Any Key... ...");
_getch();
for (I = 1; I <= NUM; I++)
{
printf("\n student %d -- name: %s", I, STD[I - 1].NAME);
printf("\n student %d -- age: %d", I, STD[I - 1].AGE);
printf("\n student %d -- ID: %s", I, STD[I - 1].ID);
}
_cprintf("\nPress Any Key To EXIT... ...");
_getch();
return 0;
}
解决方法:
将上面的红色标记代码修改如下:
// ex6.cpp: 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <conio.h>
#include <stdio.h>
int main()
{
int NUM, I;
struct STUDENT
{
char NAME[30];
int AGE;
char ID[10];
};
struct STUDENT STD[100];
_cprintf("\nHow many student do you have ? Input the nuber;");
scanf_s("%d", &NUM);
for (I = 1; I <= NUM; I++)
{
_cprintf("\nInput student %d -- name:", I);
scanf_s("%s", &STD[I - 1].NAME,30);
_cprintf("\nInput student %d -- age:", I);
scanf_s("%d", &STD[I - 1].AGE);
_cprintf("\nInput student %d -- ID:", I);
scanf_s("%s", &STD[I - 1].ID,10);
}
_cprintf("\nTo see the RESULT,Press Any Key... ...");
_getch();
for (I = 1; I <= NUM; I++)
{
printf("\n student %d -- name: %s", I, STD[I - 1].NAME);
printf("\n student %d -- age: %d", I, STD[I - 1].AGE);
printf("\n student %d -- ID: %s", I, STD[I - 1].ID);
}
_cprintf("\nPress Any Key To EXIT... ...");
_getch();
return 0;
}
转载于:https://www.cnblogs.com/TZB007/p/7615117.html
0x0F19B7EC (ucrtbased.dll)处(位于 ex6.exe 中)引发的异常: 0xC0000005: 写入位置 0x00740000 时发生访问冲突。...相关推荐
- 0x0F19B7EC (ucrtbased.dll)处(位于 ex6.exe 中)引发的异常: 0xC0000005: 写入位置 0x00740000 时发生访问冲突。
0x0F19B7EC (ucrtbased.dll)处(位于 ex6.exe 中)引发的异常: 0xC0000005: 写入位置 0x00740000 时发生访问冲突. 参考文章: (1)0x0F19 ...
- 0x00007FFF77912079 (ucrtbased.dll)处(位于 Demo.exe 中)引发的异常: 0xC0000005: 写入位置 0x000000108FD40000 时发生访问冲突
VS中"This function or variable may be unsafe."警告的解决办法 Visual2019的scanf变成scanf_s 然后我就在scanf_ ...
- vs中遇见> 0x7BA4EF8C (ucrtbased.dll)处(位于 Project1.exe 中)引发的异常: 0xC0000005: 写入位置 0x00540000 时发生访问冲突。
0x7BA4EF8C (ucrtbased.dll)处(位于 Project1.exe 中)引发的异常: 0xC0000005: 写入位置 0x00540000 时发生访问冲突. 在VS2019版中写 ...
- 0x7A09E689 (ucrtbased.dll)处(位于 TalkBack.exe 中)引发的异常: 0xC0000005: 写入位置 0x01100000 时发生访问冲突。
对于上述问题的解决办法: 在用scanf_s()读取字符串的时候需要添加一个读取的字符长长度的参数,即需要将scanf_s("%s",a)改为scanf_s("%s&qu ...
- (xxx.dll)处(位于xxx.exe 中)引发的异常: 0xC0000005: 读取位置 0x0000003F 时发生访问冲突。已解决。
下面两个这种类型的报错都一样.(跟xxx.dll和xxx.exe都没关系) 0x794CECC1 (Qt5Cored.dll)处(位于 xxx.exe 中)引发的异常: 0xC0000005: 读取位 ...
- 0x774B9E37 (KernelBase.dll)处(位于 LogonServer.exe 中)引发的异常: 0xC0000005: 读取位置 0x00000000 时发生访问冲突解决
网狐大联盟核心服务数据解锁函数访问冲突,报错: 0x774B9E37 (KernelBase.dll)处(位于 LogonServer.exe 中)引发的异常: 0xC0000005: 读取位置 0x ...
- 0x5085170C (ucrtbased.dll)处(位于 Project1.exe 中)引发的异常: 0xC0000005: 读取位置 0x0000001A 时发生访问冲突。
此处为非"%s" 类型数据以"%s"类型打印错误. #include <stdlib.h> #include <stdio.h> #if ...
- 0x00007FFA837F2487 (ucrtbased.dll)处(位于 指针.exe 中)引发的异常: 0xC0000005: 读取位置 0x0000000000000068 时发生访问冲突
大佬们 运行完就是这样了,这个该怎么办呀.
- 0x00007FFD977C04A8 (Qt5Sqld.dll)处(位于 a.exe 中)引发的异常: 0xC0000005: 读取位置 0x0000000000000010 时发生访问冲突
今天在修改别人代码的时候出现了一个问题: 我想要在子线程中使用 QSqlDatabase::addDatabase("QMYSQL"); 但是,怎么都运行不过去. 我调试,想找出问 ...
最新文章
- python 下划线转驼峰
- Q686 重复叠加字符串匹配
- jvm性能调优实战 - 45无限制的调用方法导致栈溢出OOM
- mybatis中getMapper是怎么通过动态代理得到dao接口的实现类并执行mapper文件sql语句的
- linux-shell命令之mkdir(make dir)【创建目录】
- 详解vue生命周期及每个阶段适合进行的操作
- Visual Studio 2017 新功能(下)
- hana 表空间_oracle currentval
- 防止重复提交js jquery ajax
- Dockerfile最佳实践
- 【C/C++】一篇文章教你区分数组指针指针数组
- Struts2 result type(结果类型)
- wps如何只让他显示3级标题_wps怎么把标题显示出来
- html图片幻灯片怎么做,纯CSS3制作满屏图像幻灯片
- Windows 内存机制说明
- 学会区分 RNN 的 output 和 state
- jquery 元素节点操作 - 创建节点、插入节点、删除节点
- ec20 复位命令_Quectel EC20 R2.1 AT指令集(基础部分)未完
- 爱奇艺黄金VIP会员怎么免费领取升级星钻VIP会员在电视上看奇异果TV?
- MQ2和MQ7浓度测量
热门文章
- python小项目实例流程-Python小项目:快速开发出一个简单的学生管理系统
- 怎么进入python官网-Python的安装及简单的使用
- python恶搞小程序-抖音最火的整蛊表白小程序如何做出来的?教你用python做出
- python官网地址-python官网网址
- 大专python工资有多高-最新 | 2019年Python工程师的平均薪资是多少?
- python画折线图显示点值-Python 绘制可视化折线图
- python开发需要掌握哪些知识-人工智能需要学习哪些专业课程知识?
- python与excel的应用-python基础之类与对象的应用-操作excel
- python xpath语法-Python爬虫——bs4、xpath基本语法
- 快速记忆python函数-【速学速记】Python 列表生成式的进化:生成器