Results 1 to 3 of 3

Thread: Convert interger to CString

  1. #1
    Administrator asylu3's Avatar
    Join Date
    Jun 2000
    Location
    Thailand
    Posts
    3,557


    Convert interger to CString

    [src]
    int interger=10;
    CString text;
    text.Format("%d", interger);
    [/src]

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Bangkok
    Posts
    187


    Convert integer to string
    No MFC here
    Code:
    #include <stdlib.h>
    ....
    int i = 123;
    int radix = 10;
    char ch[32]; // be sure for enough space
    _itoa(i, ch, radix); // itoa (for old traditional C)

  3. #3
    Junior Member
    Join Date
    Apr 2008
    Posts
    16


    ไม่รู้ว่านี้ของ C# ปล่าวนะเพราะเท่าที่รู้มา C language ไม่มี Cstring แต่ C# มี
    ถ้าใช่ ก้อง่ายมากๆเลย

    int interger=10;
    CString text;
    text=integer.ToString(); เพราะ Csting กับ string นั้นใช้กันได้ ผมเคยลองแล้ว

    ทำได้ยังไง หรือยังไงลอง pm มาครับ ตอนนี้เริ่มเล่น C# อยู่

Similar Threads

  1. CString to *char (Unicode to ASCII)
    By Tummy in forum C/C++,C#,VC++,MFC,Win32
    Replies: 1
    Last Post: 11-02-2008, 04:07 PM
  2. Convert CString to char*
    By asylu3 in forum C/C++,C#,VC++,MFC,Win32
    Replies: 1
    Last Post: 04-02-2005, 02:32 PM
  3. convert interger (int) to string
    By asylu3 in forum C/C++,C#,VC++,MFC,Win32
    Replies: 0
    Last Post: 27-02-2004, 08:38 PM
  4. How to use CString in VC++
    By asylu3 in forum C/C++,C#,VC++,MFC,Win32
    Replies: 0
    Last Post: 26-07-2003, 09:41 PM
  5. Interger to string
    By asylu3 in forum C/C++,C#,VC++,MFC,Win32
    Replies: 0
    Last Post: 30-01-2003, 05:19 PM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Posting Permissions

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