Click here to Skip to main content
14,639,349 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: vs2019 + v71 + v80 Pin
hmd-omani21-Jul-20 2:39
Memberhmd-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
Memberhmd-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
Memberhmd-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
Memberhmd-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:
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
Memberhmd-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
MemberMircea Neacsu21-Jul-20 23:06 
GeneralRe: vs2019 + v71 + v80 Pin
hmd-omani22-Jul-20 0:44
Memberhmd-omani22-Jul-20 0:44 
AnswerRe: vs2019 + v71 + v80 Pin
Mircea Neacsu22-Jul-20 2:31
MemberMircea Neacsu22-Jul-20 2:31 
QuestionSOLVED compiler "unresolved inclusion" is not an error ? Pin
Vaclav_18-Jul-20 6:30
MemberVaclav_18-Jul-20 6:30 
AnswerRe: compiler "unresolved inclusion" is not an error ? Pin
k505418-Jul-20 7:44
mvek505418-Jul-20 7:44 
GeneralRe: compiler "unresolved inclusion" is not an error ? Pin
Vaclav_18-Jul-20 7:55
MemberVaclav_18-Jul-20 7:55 
GeneralPutting pkg-config as options generates this error Pin
Vaclav_18-Jul-20 16:39
MemberVaclav_18-Jul-20 16:39 
GeneralRe: Putting pkg-config as options generates this error Pin
leon de boer21-Jul-20 19:22
Memberleon de boer21-Jul-20 19:22 
GeneralRe: compiler "unresolved inclusion" is not an error ? Pin
Richard MacCutchan18-Jul-20 22:06
mveRichard MacCutchan18-Jul-20 22:06 
AnswerMessage Closed Pin
18-Jul-20 13:47
MemberMember 1489299718-Jul-20 13:47 
Question[SOLVED CLOSED] See addendum GCC ` backtick` CLI - what does it actually do ? Pin
Vaclav_16-Jul-20 14:30
MemberVaclav_16-Jul-20 14:30 
AnswerRe: GCC ` backtick` CLI - what does it actually do ? Pin
Peter_in_278016-Jul-20 15:44
professionalPeter_in_278016-Jul-20 15:44 
GeneralRe: GCC ` backtick` CLI - what does it actually do ? Pin
Vaclav_16-Jul-20 15:57
MemberVaclav_16-Jul-20 15:57 
GeneralRe: GCC ` backtick` CLI - what does it actually do ? Pin
k505417-Jul-20 3:53
mvek505417-Jul-20 3:53 
GeneralRe: GCC ` backtick` CLI - what does it actually do ? Pin
Vaclav_17-Jul-20 4:55
MemberVaclav_17-Jul-20 4:55 

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.