且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将std:string转换为LPCTSTR

更新时间:2021-12-21 06:33:46

* farseer:
* farseer:
如何我可以这样做吗?




标准C ++没有一个名为LPCTSTR的类型,你没有定义它的
。 />

即,你在clc ++中没有话题了。


请将你的问题发给e。 G。 [comp.os.ms-windows.programmer.win32]。


-

答:因为它弄乱了人们通常阅读文字的顺序。

问:为什么这么糟糕?

A:热门发布。

问:什么是最烦人的事情usenet和电子邮件?



Standard C++ does not have a type called LPCTSTR, and you haven''t
defined it.

I.e., you''re off-topic in clc++.

Please post your question to e.g. [comp.os.ms-windows.programmer.win32].

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


farseer写道:
farseer wrote:
我怎么能这样做?

我'' d想调用以下代码:
How can i do this?

i''d like to call the following code:
snip incomplete,特定于平台的代码<
snip incomplete, platform-specific code<



http://www.parashift.com/c++- faq-lit ... t.html#faq-5.8
http://www.parashift.com/c++-faq-lit...t.html#faq-5.9


Luke



http://www.parashift.com/c++-faq-lit...t.html#faq-5.8
http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Luke




" farseer" &LT; FA ***** @ optonline.net&GT;在消息中写道

news:11 ********************* @ j73g2000cwa.googlegro ups.com ...

"farseer" <fa*****@optonline.net> wrote in message
news:11*********************@j73g2000cwa.googlegro ups.com...
我该怎么做?

我想打电话给以下代码:

...
string url =< my urld&gt ;;
TCHAR * urlParams = GetParams();
url.append((char *)urlParams);
GotoURL((LPCTSTR)url); < ------这是我的问题
How can i do this?

i''d like to call the following code:

...
string url = <my urld>;
TCHAR* urlParams = GetParams( );
url.append( (char * ) urlParams );
GotoURL( ( LPCTSTR ) url ); <------THIS IS MY ISSUE




将定义回滚到LPCTSTR它是一个const widechar指针。


你*可能*可以使用url.c_str()这是一个const char *,但我不是

正面。试试microsoft.public.vc.language或其他Windows平台

特定组以获得明确答案,因为这个问题实际上是关闭的

主题此处(仅因为LPCTSTR是特定于Windows的)



Folling back the definition to LPCTSTR it is a const widechar pointer.

You *may* be able to use url.c_str() which is a const char*, but I''m not
positive. Try microsoft.public.vc.language or another windows platform
specific group for a definitive answer as this question is actually off
topic here (only because LPCTSTR is windows specific )