作者SJYZ (益)
看板Programming
标题[问题] VS 使用scanf与scanf_s 程式执行错误
时间Thu Jun 2 21:18:17 2016
最近我在VS利用scanf用来输入一个数字
但经过compiler後出现错误 => 建议我使用scanf_s
改过後,出现warning,以下
'scanf_s':format string '%lf' requires an argument of type 'double *',but variadic argument 1 has type 'double'
状况:输入数字後,出现错误视窗 =>Debug Assertion Failed! 中止
找过资料,也解决不了
请问哪方面错了?
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.124.42.69
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Programming/M.1464873500.A.25C.html
1F:→ bibo9901: 不就很白话的告诉你了: 他要的是double* 140.112.16.139 06/02 21:24
2F:→ IKAFIRE: 他warning都写了,要pointer不给pointer 140.112.187.97 06/02 21:24
3F:→ bibo9901: 但你给的是double. 找资料能力有待加强 140.112.16.139 06/02 21:24