Results 1 to 2 of 2

Thread: Convert CString to char*

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


    Convert CString to char*

    [src]
    char target[]="";
    CString src="hello";
    target=src.GetBuffer(10);
    [/src]

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


    Re: Convert CString to char*

    Code:
    CString str;
    
    ...
    
    char* pCh = (LPCTSTR) str;

Similar Threads

  1. Convert interger to CString
    By asylu3 in forum C/C++,C#,VC++,MFC,Win32
    Replies: 2
    Last Post: 09-04-2008, 06:35 PM
  2. 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
  3. convert string, char to be computable number
    By newsbot in forum C/C++,C#,VC++,MFC,Win32
    Replies: 0
    Last Post: 06-08-2004, 09:07 PM
  4. Convert integer to character (int to char)
    By ar3s in forum C/C++,C#,VC++,MFC,Win32
    Replies: 0
    Last Post: 16-12-2003, 03:25 AM
  5. 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

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
  •