sibarrick Posted February 16, 2006 Share Posted February 16, 2006 How do you convert a float to a UT_String? I see itoa and utoa for ints but no ftoa, so how do you do it? Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted February 16, 2006 Share Posted February 16, 2006 How do you convert a float to a UT_String?I see itoa and utoa for ints but no ftoa, so how do you do it? 24791[/snapback] Hi Simon, If you're talking about VEX, then sprintf() will do it. If you're talking about the HDK, then there are lots of choices... From C: *) #include <stdlib.h>: fcvt(), ecvt(), gcvt() (not ANSI-C but usually supported) *) #include <stdio.h>: sprintf() From C++: *) #include <sstream>: ostringstream.operator<<() Quote Link to comment Share on other sites More sharing options...
sibarrick Posted February 16, 2006 Author Share Posted February 16, 2006 Yes HDK, I'm aware of sprintf in VEX. Many thanks for quick reply. Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted February 17, 2006 Share Posted February 17, 2006 Yes HDK, I'm aware of sprintf in VEX. LOL, I just now noticed that this is the HDK forum, DUH!... brain damage... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.