Conversion from Float to String

This is a discussion on Conversion from Float to String within the C++ Programming forums, part of the General Programming Boards category; Can someone help? I can't figure out how to convert a variable of type float to a string. any help ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1

    Unhappy Conversion from Float to String

    Can someone help? I can't figure out how to convert a variable of type float to a string. any help would be great.

    Thanks

  2. #2
    Unregistered
    Guest
    try this
    sprintf(oi,"%d",OI);
    /*use sprintf to convert numbers to strings %d converts ints you will have to change it for floats*/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 01:02 AM
  2. String issues
    By The_professor in forum C++ Programming
    Replies: 7
    Last Post: 06-12-2007, 09:11 AM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  4. RicBot
    By John_ in forum C++ Programming
    Replies: 8
    Last Post: 06-13-2006, 06:52 PM
  5. Opengl walking leg animation
    By Bobby230 in forum C Programming
    Replies: 3
    Last Post: 03-05-2006, 02:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21