0

Convert string to float in c++

Hello! For example, i've got a string with text like "4*2" and how can i get a result of 4*2? p.s. sorry for my bad english :)

4th Dec 2018, 11:19 AM
ĐŸŃ€ĐžĐ·Ń€Đ°ĐșTM
ĐŸŃ€ĐžĐ·Ń€Đ°ĐșTM - avatar
2 Answers
+ 6
Use std::stof from <string> library Âč [To see the example follow the footer link] "sorry for my bad english :)" Your English is awesome, IMO! 8) _____ Âč http://www.cplusplus.com/reference/string/stof/
4th Dec 2018, 11:40 AM
Babak
Babak - avatar
+ 1
oh, thanks a lot!)
4th Dec 2018, 12:09 PM
ĐŸŃ€ĐžĐ·Ń€Đ°ĐșTM
ĐŸŃ€ĐžĐ·Ń€Đ°ĐșTM - avatar