CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Integer to ASCII

    how can I take an integer variable equal to 1123
    and make it a string equal to "1123"

    eg: int number=1123;
    CString string;
    string = number;

    such that string ="1123"



  2. #2
    Join Date
    May 1999
    Posts
    156

    Re: Integer to ASCII

    Hi,

    The way I do it is:
    int number=1123;
    CString string;
    string.Format("%d",number);

    Hope this helps.

    Will


  3. #3
    Guest

    Re: Integer to ASCII

    Or you could use C's itoa function!?!??!

    char *itoa(int value, char *string, int radix);


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured