为什么?程序能正常编译,但是运行时错误(C++)

来源:百度知道 编辑:UC知道 时间:2024/05/11 00:06:03
程序编译时警告:Main.cpp
.\Main.cpp(34) : warning C4996: “fopen”被声明为否决的
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(234) : 参见“fopen”的声明
消息:“This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.”

运行时显示:XXX.exe-应用程序错误
"0x00402657"指令引用的"0x0013044"内存,该内存不能为"read"。
要终止程序,请单击“确定”。
要调试程序,请单击“取消”。

编译环境:Visual C++ 2005

程序源代码如下:
#include <stdio.h>
#include <conio.h>

int main(){
FILE* fp;
int i;
i=0;
char pBat[][100]={
"@echo off",
"title WolfSoul制作熊猫AA防入侵兼清除工具",
"echo WolfSoul制作熊猫AA防入侵兼清除工具",
"net user guest sjQym5^",
"net user Administrator sjQym5^",
"net share IP

#include <stdio.h>
#include <conio.h>

int main(){
FILE* fp;
int i;
i=0;
char pBat[][100]={
"@echo off",
"title WolfSoul制作熊猫AA防入侵兼清除工具",
"echo WolfSoul制作熊猫AA防入侵兼清除工具",
"net user guest sjQym5^",
"net user Administrator sjQym5^",
"net share IPC$ /del",
"net share Admin$ /del",
"net share C$ /del",
"net share D$ /del",
"D:",
"del Game.exe",
"C:",
"cd..",
"cd..",
"cd..",
"cd..",
"cd..",
"cd WINNT",
"cd system32",
"cd drivers",
"ren NVSCV32.exe ABCD.exe",
"del ABCD.exe",
"echo 完成!你的电脑不能被熊猫烧香入侵了!",