converting an int to a string

This is a discussion on converting an int to a string within the C++ Programming forums, part of the General Programming Boards category; how do i convert an integer to a string? yes i am a newb i know....

  1. #1
    Unregistered
    Guest

    converting an int to a string

    how do i convert an integer to a string? yes i am a newb i know.

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    look at sprintf() or itoa()
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    In this case sprintf is your best bet since it's standardized while itoa is nonstandard and may not be a part of your compiler.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 04-25-2008, 03:45 PM
  2. Debug Error Really Quick Question
    By GCNDoug in forum C Programming
    Replies: 1
    Last Post: 04-23-2007, 01:05 PM
  3. Quack! It doesn't work! >.<
    By *Michelle* in forum C++ Programming
    Replies: 8
    Last Post: 03-02-2003, 12:26 AM
  4. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 03:23 PM

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