Logo

Programming-Idioms

History of Idiom 146 > diff from v32 to v33

Edit summary for version 33 by programming-idioms.org:
[C++] Variable name f, s

Version 32

2020-09-30, 08:54:01

Version 33

2020-09-30, 08:54:45

Idiom #146 Convert string to floating point number

Extract floating point value f from its string representation s

Idiom #146 Convert string to floating point number

Extract floating point value f from its string representation s

Variables
f,s
Variables
f,s
Extra Keywords
real conversion
Extra Keywords
real conversion
Code
float fl = std::stof("1.5");
Code
float f = std::stof(s);
Demo URL
https://godbolt.org/z/Fi7nNl
Demo URL
https://godbolt.org/z/Fi7nNl