当前位置:网站首页>Use of the vs2022scanf function. An error is reported when using scanf - the return value is ignored: Solutions
Use of the vs2022scanf function. An error is reported when using scanf - the return value is ignored: Solutions
2022-06-23 19:47:00 【51CTO】
scanf() yes C Language format input function , and printf Functions are also known in studo.h In the header file , Used here scanf function , Simple summation example , as follows 
In the seventh line of the current program , We used scanf Function , Then wait for the user's input , It accepts the address of the variable , So in general, in addition to pointer variables and array names, you must add &. Don't forget to &, Don't forget to &, Don't forget to &!!!
scanf Call format for (“”,);
After running, press the following mode to output num1,mum2 Value
It should have been a normal process
however
Report errors :“scanf” The return value is ignored
I searched the Internet , Successfully solved
You need to prefix the entire code with
define _CRT_SECURE_NO_WARNINGS
Running successfully , The following are successful examples 
Careful students will find that I use “scanf_s” function , instead of "scanf"
Because the return value is ignored scanf It is because... Is not used in the code scanf The return value of , Need to use scanf_s Instead of a function scanf,scanf yes C Language provides , and scanf_s Not the standard C Language provides , yes vs Compiler provided , Finally, the program finally runs .
边栏推荐
- Application of JDBC in performance test
- 直播分享| 腾讯云 MongoDB 智能诊断及性能优化实践
- 小程序开发框架推荐
- 5 月最大的 GameFi 崩溃受害者能否在熊市中生存?| May Monthly Report
- How to use the low code platform of the Internet of things for process management?
- 金鱼哥RHCA回忆录:DO447管理用户和团队的访问--用团队有效地管理用户
- Goldfish rhca memoirs: do447 managing user and team access -- effectively managing users with teams
- How to install SSL certificates in Microsoft Exchange 2010
- Technology sharing | wvp+zlmediakit realizes streaming playback of camera gb28181
- LeetCode 每日一题——30. 串联所有单词的子串
猜你喜欢

Vprom notes

在线文本实体抽取能力,助力应用解析海量文本数据

Interpreting the 2022 agile coaching industry status report

金九银十,靠这个细节,offer拿到手软!

Daily question brushing record (II)

盘点四种WiFi加密标准:WEP、WPA、WPA2、WPA3

Game asset reuse: a new way to find required game assets faster

Crise de 35 ans? Le volume intérieur est devenu synonyme de programmeur...

35 year old crisis? It has become a synonym for programmers

Importance and purpose of test
随机推荐
在线文本实体抽取能力,助力应用解析海量文本数据
Save: software analysis, verification and test platform
科班出身,结果外包都不要
实现vscode写markdown文档+图片自动上传至腾讯云cos
Daily question brushing record (II)
I came from a major, so I didn't want to outsource
How to write a great online user manual in 7 steps
35岁危机?内卷成程序员代名词了…
力扣每日一练之字符串Day6
打新债好不好 打新债安全吗
解读2022年度敏捷教练行业现状报告
What are the requirements for new bonds? Is it safe to play new bonds
活动报名 | MongoDB 5.0 时序存储特性介绍
vs2022scanf函数的使用,使用scanf的报错-返回值被忽略:解决·方法
小程序开发框架推荐
Rendering of kotlin jetpack compose tab using animatedvisibility
盘点四种WiFi加密标准:WEP、WPA、WPA2、WPA3
Development of block hash quiz game system (DAPP)
打新债有何要求 打新债安全吗
1、 Summary and introduction