CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2000
    Location
    England
    Posts
    574

    Function needed to Make an int into CString

    Hi
    I hope someone can help ?
    I need a good function for making an int into a CString

    any ideas

    thanks

    P

  2. #2
    Join Date
    May 2000
    Location
    Toronto, ON, Canada
    Posts
    3,573
    Use CString::Format. See in MSDN for details.
    Regards,

    Emanuel Vaduva

  3. #3
    Join Date
    May 2000
    Location
    England
    Posts
    574

    Talking

    Thanks

  4. #4
    Join Date
    Jul 2000
    Location
    In a flat, Wimbledon, UK
    Posts
    251
    Hi there Posty. Check out the following :

    Code:
    int nInt = 56789;
    
    CString strConverted;
    
    strConverted.Format("%d", nInt);
    Voila!

    Hope that helps.
    Ask a question and you're a fool for three minutes;
    do not ask a question and you're a fool for the rest of your life.
    - Chinese Proverb

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