编译C程序时遇到的问题 ignore erase clear all bad skip all bad

来源:百度知道 编辑:UC知道 时间:2024/06/02 05:41:58
本人是一菜鸟 在编译一个简单程序是遇到的问题,源代码如下:
#include <stdio.h>
main()
{ long k;
printf("please input the number:");
scanf("%d",&k);
if(k==375684)
printf("Active! \n");
else
printf("error! \n") ;
}

如用LONG就会出现ignore erase clear all bad skip all bad
INT就不会
但是总是显示ERROR 即使输入375684还是显示ERROR

#include <stdio.h>
void main()
{
long k;
printf("please input the number:");
scanf("%d",&k);
if(k==375684)
printf("Active! \n");
else
printf("error! \n") ;
}

LONG INT等都是VC中的,C语言中不能用啊。

没有啊。我怎么输入的时候是Active! ????

我的编译器是Visual C++ 2005. 你确信你输入正确吗?或者是由于计算机储存原理的问题?

------ 已启动生成: 项目: baidu, 配置: Debug Win32 ------
正在编译...
main.cpp
e:\documents\visual studio 2005\projects\baidu\baidu\main.cpp(6) : warning C4996: “scanf”被声明为否决的
d:\program files\microsoft visual studio 8\vc\include\stdio.h(295) : 参见“scanf”的声明
消息:“This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.”
正在链接...
正在嵌入清单...
生成日志保存在“file://e:\Documents\Visual St