Managed c++ float/double/integer to String and vice-versa?
-
Hello, I am trying to display float/double/integer to a string with custom format in Label. But I couldn't find snprintf available in managed c++. How can I achieve this?
-
Hello, I am trying to display float/double/integer to a string with custom format in Label. But I couldn't find snprintf available in managed c++. How can I achieve this?
Did you try ToString method?
int count = 100;
System::String^ s = count.ToString(); -
Did you try ToString method?
int count = 100;
System::String^ s = count.ToString();Hello, I have tried ToString(), but I could not format to the how many decimal places to display .
-
Hello, I have tried ToString(), but I could not format to the how many decimal places to display .
Then use ToString() with the format specifications. See the example: [Converting Double To System::string^ - C And C++ | Dream.In.Code](https://www.dreamincode.net/forums/topic/98077-converting-double-to-systemstring/)