vc++ 2008调试过程说:Run-Time Check Failure #2 - Stack around the variable 'a' was corrupted.下面为被调试程序(我的目的是输出10个数中最大的数) #include "stdafx.h"#include"stdio.h"void main() {int a[10]; int i,j,t; for (

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/06 03:50:32
vc++ 2008调试过程说:Run-Time Check Failure #2 - Stack around the variable 'a' was corrupted.下面为被调试程序(我的目的是输出10个数中最大的数) #include

vc++ 2008调试过程说:Run-Time Check Failure #2 - Stack around the variable 'a' was corrupted.下面为被调试程序(我的目的是输出10个数中最大的数) #include "stdafx.h"#include"stdio.h"void main() {int a[10]; int i,j,t; for (
vc++ 2008调试过程说:Run-Time Check Failure #2 - Stack around the variable 'a' was corrupted.下面为被调试程序(我的目的是输出10个数中最大的数)
#include "stdafx.h"
#include"stdio.h"
void main()
{int a[10];
int i,j,t;
for (i=1;i

vc++ 2008调试过程说:Run-Time Check Failure #2 - Stack around the variable 'a' was corrupted.下面为被调试程序(我的目的是输出10个数中最大的数) #include "stdafx.h"#include"stdio.h"void main() {int a[10]; int i,j,t; for (
数组越界了,将int a[10];改为int a[11].因为int a[10]是指a[0]-a[9]这几个元素,而你读入的却包含了a[10],因此造成了数组越界.