【发布时间】:2012-11-27 02:47:22
【问题描述】:
我正在使用 C++(Windows 环境)。我有一个:
LPCWSTR mystring;
这行得通:
mystring = TEXT("Hello");
但是怎么做呢? :
mystring = ((((create a new string with text = the content which is in another LPCWSTR 'myoldstring'))))
提前非常感谢!
PS:
mystring = myoldstring;
会起作用,但它不会创建一个新字符串,它会是同一个指针。我想创建一个新字符串!
【问题讨论】:
标签: c++ windows string pointers copy