Solved

CString to char *

Posted on 2004-09-23
2
188 Views
Last Modified: 2013-11-20
How can I do the above conversion? Thank you
0
Comment
Question by:iportu
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 12137566
You can just use teh built-in conversion operator ("CString::operator LPCTSTR"), e.g.

CString strTest ("Some text here");
const char* psz = (LPCTSTR) strTest;

or

CString strTest ("Some text here");
char* psz = strTest.GetBuffer(0);
0
 

Author Comment

by:iportu
ID: 12137638
Thanks
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
deburging in oracle form 12 100
Shell script to login to remote m/c and execute commands 10 78
canBalance challenge 34 87
Fibonacci challenge 11 124
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question