473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

CString to Char* (wchar_t *)

CString str,s;
str = _T("DATA"); / str = "DATA";
const wchar_t *c = sPorts.GetBuffer(0);
s.Format(_T("%s"),c);
AfxMessageBox(s); or Printf/cout.....
Aug 10 '07 #1
0 1461

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Markus Hämmerli | last post by:
I ' ll tra to convert a Cstring to char* without success. I working in a Unicode enabled environment this is working in Unicode CString source = _T("TestString"); TCHAR *szSource =...
1
by: dave | last post by:
Hi, I would apprecaite the followinghelp; I need to pass a TCHAR * s = foo*.* \0 *h\0" to CString operator, but it will stop reading input at teh first \0, how do I work around this ?? ...
5
by: Paul | last post by:
Hi, Any one knows how to convert CString to LPCWSTR? Please advice, thanks! -P
5
by: Neo | last post by:
how convert CString to char *? regards, Mohammad Omer Nasir
0
by: Sebastian Dau | last post by:
Hello Newsgroup, I'm struggeling with wrapping a dll using MFC CStrings. Code: class CLASSEXPORTDLL_API CClassExportDll { public:
10
by: Dancefire | last post by:
Hi, everyone, I'm writing a program using wstring(wchar_t) as internal string. The problem is raised when I convert the multibyte char set string with different encoding to wstring(which is...
4
by: sebastian.dau | last post by:
Hello Newsgroup, I have a link error that I did not manage to fix. I basically consume a VC 8.0 C++ dll that exports a class with a method containing CString declaration as follows: class...
5
by: ProgMaster | last post by:
I've used the Cstring format to convernt a CTime into a a CString, yet I get an error message, here's the code: void CTimerDlg::OnTimer(UINT_PTR nIDEvent) { CString m_sTime; // TODO: Add your...
5
by: Samant.Trupti | last post by:
Hi, There is one thing I am cofused about.... If I have a declareation say char str; Now if I want to change it to wchar so do I have to change it like .... wchar_t str; or double the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.