报错中文释义:在变量XX周围的堆栈已损坏

我的代码:

#include<stdio.h>
 
void test(int  *x) {
	*x = 1024;
	printf("test函数内部x=%d\n", *x);
}
 
int main() {
	int x = 1;
	printf("调用test前 x=%d\n", x);
	test(&x);
	printf("调用test后 x=%d\n", x);
	return 0;
}

原因指路:可能的原因

我的最终解决方法:

 把“基本运行时检查”改为默认值即可

 

Logo

一站式 AI 云服务平台

更多推荐