Click here to Skip to main content
15,908,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: In c++ How to deny usb read write? Pin
Member 1487268127-Jul-20 18:29
Member 1487268127-Jul-20 18:29 
QuestionQueryBinaryValue to CByteArray Pin
_Flaviu24-Jul-20 4:19
_Flaviu24-Jul-20 4:19 
AnswerRe: QueryBinaryValue to CByteArray Pin
Mircea Neacsu24-Jul-20 4:28
Mircea Neacsu24-Jul-20 4:28 
GeneralRe: QueryBinaryValue to CByteArray Pin
_Flaviu24-Jul-20 5:16
_Flaviu24-Jul-20 5:16 
AnswerRe: QueryBinaryValue to CByteArray Pin
Victor Nijegorodov25-Jul-20 23:16
Victor Nijegorodov25-Jul-20 23:16 
QuestionVS2019, Code analysis warning: C6385 mystery Pin
QuiJohn23-Jul-20 2:39
QuiJohn23-Jul-20 2:39 
AnswerRe: VS2019, Code analysis warning: C6385 mystery Pin
Richard MacCutchan23-Jul-20 5:53
mveRichard MacCutchan23-Jul-20 5:53 
AnswerRe: VS2019, Code analysis warning: C6385 mystery Pin
Joe Woodbury23-Jul-20 9:10
professionalJoe Woodbury23-Jul-20 9:10 
Questionvs2019 + v71 + v80 Pin
hmd-omani20-Jul-20 19:50
hmd-omani20-Jul-20 19:50 
AnswerRe: vs2019 + v71 + v80 Pin
Victor Nijegorodov20-Jul-20 20:42
Victor Nijegorodov20-Jul-20 20:42 
GeneralRe: vs2019 + v71 + v80 Pin
hmd-omani20-Jul-20 23:38
hmd-omani20-Jul-20 23:38 
GeneralRe: vs2019 + v71 + v80 Pin
Victor Nijegorodov20-Jul-20 23:51
Victor Nijegorodov20-Jul-20 23:51 
GeneralRe: vs2019 + v71 + v80 Pin
Richard MacCutchan21-Jul-20 0:42
mveRichard MacCutchan21-Jul-20 0:42 
GeneralRe: vs2019 + v71 + v80 Pin
hmd-omani21-Jul-20 2:39
hmd-omani21-Jul-20 2:39 
GeneralRe: vs2019 + v71 + v80 Pin
Richard MacCutchan21-Jul-20 2:54
mveRichard MacCutchan21-Jul-20 2:54 
GeneralRe: vs2019 + v71 + v80 Pin
hmd-omani21-Jul-20 3:10
hmd-omani21-Jul-20 3:10 
GeneralRe: vs2019 + v71 + v80 Pin
Richard MacCutchan21-Jul-20 3:29
mveRichard MacCutchan21-Jul-20 3:29 
GeneralRe: vs2019 + v71 + v80 Pin
hmd-omani21-Jul-20 3:56
hmd-omani21-Jul-20 3:56 
GeneralRe: vs2019 + v71 + v80 Pin
Richard MacCutchan21-Jul-20 3:59
mveRichard MacCutchan21-Jul-20 3:59 
GeneralRe: vs2019 + v71 + v80 Pin
hmd-omani21-Jul-20 9:58
hmd-omani21-Jul-20 9:58 
GeneralRe: vs2019 + v71 + v80 Pin
Richard MacCutchan21-Jul-20 10:11
mveRichard MacCutchan21-Jul-20 10:11 
Too many % characters there. Remember in a printf/scanf format the % is the control character, so two of them means print (or read) a single "%" character. So in your call it expects to read a string of the form "%.2f", and requires no parameters. It should be:
C++
sscanf(parm, "%5f", &f ); // single % character to introduce the format, read up to 5 character float value.


[edit]
The width value for scanf indicates the maximum number of characters to read for that field, so does not require the dot prefix, but should be large enough for the largest number.
See updated code.
[/edit]

modified 21-Jul-20 16:22pm.

GeneralRe: vs2019 + v71 + v80 Pin
hmd-omani22-Jul-20 1:34
hmd-omani22-Jul-20 1:34 
GeneralRe: vs2019 + v71 + v80 Pin
Richard MacCutchan22-Jul-20 1:43
mveRichard MacCutchan22-Jul-20 1:43 
GeneralRe: vs2019 + v71 + v80 Pin
Mircea Neacsu21-Jul-20 23:06
Mircea Neacsu21-Jul-20 23:06 
GeneralRe: vs2019 + v71 + v80 Pin
hmd-omani22-Jul-20 0:44
hmd-omani22-Jul-20 0:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.