c语言error lnk1120,c语言编译错误 fatal error LNK1120: 1 个无法解析的外部命令

程序如下:

#includevoid main()

{

int a,b;

long c;

unsigned long d;

unsigned int e;

char f;

float g;

scanf("%d,%d,%ld,%lu,%u,%c,%f",&a,&b,&c,&d,&e,&f,&g);

printf("int %d,%d,%d,%d,%d,%d,%d",a,b,c,d,e,f,g);

printf("unsigned int %u,%u,%u,%u,%u,%u,%u",a,b,c,d,e,f,g);

printf("long %ld,%ld,%ld,%ld,%ld,%ld,%ld",a,b,c,d,e,f,g);

printf("short %hd,%hd,%hd,%hd,%hd,%hd,%hd",a,b,c,d,e,f,g);

printf("signed char %c,%c,%c,%c,%c,%c,%c",a,b,c,d,e,f,g);

printf("float %f,%f,%f,%f,%f,%f,%f",a,b,c,d,e,f,g);

}

编译错误全部内容:

1>------ 已启动生成: 项目: 2-5 类型变换, 配置: Debug Win32 ------

1> 2-5 类型变换.cpp

1>c:\users\administrator\documents\visual studio 2012\projects\2-5 类型变换\2-5 类型变换\2-5 类型变换.cpp(10): warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

1> c:\program files (x86)\microsoft visual studio 11.0\vc\include\stdio.h(290) : 参见“scanf”的声明

1>MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用

1>C:\Users\Administrator\Documents\Visual Studio 2012\Projects\2-5 类型变换\Debug\2-5 类型变换.exe : fatal error LNK1120: 1 个无法解析的外部命令

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值