int to string

This is a discussion on int to string within the C++ Programming forums, part of the General Programming Boards category; Hello, I was wondering if there is anything to convert an integer value to a string value? I've tried several ...

  1. #1
    Unregistered
    Guest

    int to string

    Hello,

    I was wondering if there is anything to convert an integer value to a string value?

    I've tried several methods, but they don't seem to work....

    Thanks

  2. #2
    Registered User quagsire's Avatar
    Join Date
    Jun 2002
    Posts
    60
    Code:
    int intVar = 12345;
    char strVar[20];
    sprintf(strVar, "%d", intVar);

  3. #3
    Unregistered
    Guest
    thanks !

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to combine these working parts??
    By transgalactic2 in forum C Programming
    Replies: 0
    Last Post: 02-01-2009, 07:19 AM
  2. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  3. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 05:05 PM
  4. How do you search & sort an array?
    By sketchit in forum C Programming
    Replies: 30
    Last Post: 11-03-2001, 04:26 PM

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