Aug 3, 2001 #2 Cagliostro Programmer Sep 13, 2000 4,226 GB below are some methods on using char* to wchar_t. BSTR is the same as wchar_t* or unsigned short* #include<comdef.h>//for _bstr_t #include<iostream> using namespace std;//for iostream int main() { BSTR bx = L"Hello "; char* cx = "world" _bstr_t x = bx; bx += cx; wcout<<bx; cout<<cx<<endl; wcout<<(BSTR)x<<endl; cout<<(char*)x<<endl; BSTR by = (BSTR)x; char cy = (char*)x; wcout<<by<<endl; cout<<cy<<endl; cout<<"there was shown some tehnics on using ATL "<<endl; return 0; } John Fill ivfmd@mail.md Upvote 0 Downvote
below are some methods on using char* to wchar_t. BSTR is the same as wchar_t* or unsigned short* #include<comdef.h>//for _bstr_t #include<iostream> using namespace std;//for iostream int main() { BSTR bx = L"Hello "; char* cx = "world" _bstr_t x = bx; bx += cx; wcout<<bx; cout<<cx<<endl; wcout<<(BSTR)x<<endl; cout<<(char*)x<<endl; BSTR by = (BSTR)x; char cy = (char*)x; wcout<<by<<endl; cout<<cy<<endl; cout<<"there was shown some tehnics on using ATL "<<endl; return 0; } John Fill ivfmd@mail.md