0

can we assign float value to string?

7th Oct 2016, 2:10 PM
ABHISHEK GOEL
ABHISHEK GOEL - avatar
2 odpowiedzi
0
try using explicit type casting. float f; string str=(string)f;
7th Oct 2016, 3:19 PM
APPORVA arya
APPORVA arya - avatar
0
float f = 23.5f; string s = std::to_string(f);
7th Oct 2016, 4:01 PM
kiwiyou
kiwiyou - avatar