Click here to Skip to main content
15,888,527 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: Converting a wstring to UTF8? Pin
alabax13-Apr-06 5:28
alabax13-Apr-06 5:28 
QuestionHow to convert string to wstring by means of STL and C++ headers only? Pin
alabax12-Apr-06 4:48
alabax12-Apr-06 4:48 
Answeroff topic, but... Pin
toxcct12-Apr-06 5:22
toxcct12-Apr-06 5:22 
JokeRe: off topic, but... Pin
alabax12-Apr-06 8:01
alabax12-Apr-06 8:01 
GeneralRe: off topic, but... Pin
toxcct12-Apr-06 21:28
toxcct12-Apr-06 21:28 
GeneralRe: off topic, but... Pin
alabax13-Apr-06 5:29
alabax13-Apr-06 5:29 
AnswerRe: How to convert string to wstring by means of STL and C++ headers only? Pin
Stuart Dootson12-Apr-06 6:29
professionalStuart Dootson12-Apr-06 6:29 
GeneralRe: How to convert string to wstring by means of STL and C++ headers only? Pin
alabax12-Apr-06 8:03
alabax12-Apr-06 8:03 
like this:

wstring s2w(const string &s)
{
size_t l=s.size()+1;
const char *pc=s.c_str();
wchar_t *pw=new wchar_t[l];
locale loc("");
use_facet<ctype<wchar_t>>(loc).widen(pc,pc+l-1,pw);
return wstring(pw);
}

-- modified at 14:03 Wednesday 12th April, 2006
GeneralRe: How to convert string to wstring by means of STL and C++ headers only? Pin
Stuart Dootson12-Apr-06 8:28
professionalStuart Dootson12-Apr-06 8:28 
GeneralRe: How to convert string to wstring by means of STL and C++ headers only? Pin
alabax12-Apr-06 8:49
alabax12-Apr-06 8:49 
GeneralRe: How to convert string to wstring by means of STL and C++ headers only? Pin
Rob Caldecott12-Apr-06 8:53
Rob Caldecott12-Apr-06 8:53 
GeneralRe: How to convert string to wstring by means of STL and C++ headers only? Pin
Stuart Dootson12-Apr-06 10:20
professionalStuart Dootson12-Apr-06 10:20 
GeneralRe: How to convert string to wstring by means of STL and C++ headers only? Pin
Rob Caldecott12-Apr-06 8:51
Rob Caldecott12-Apr-06 8:51 
GeneralThe corrected version ;) Pin
alabax13-Apr-06 3:02
alabax13-Apr-06 3:02 
GeneralRe: The corrected version ;) Pin
Nemanja Trifunovic13-Apr-06 3:11
Nemanja Trifunovic13-Apr-06 3:11 
GeneralRe: The corrected version ;) Pin
alabax13-Apr-06 5:24
alabax13-Apr-06 5:24 
GeneralRe: The corrected version ;) Pin
Johann Gerell25-Apr-06 20:58
Johann Gerell25-Apr-06 20:58 
Questionhow to access messages that have been arrived from msmq Pin
kiran janaswamy12-Apr-06 1:44
kiran janaswamy12-Apr-06 1:44 
AnswerRe: how to access messages that have been arrived from msmq Pin
David Crow13-Apr-06 2:49
David Crow13-Apr-06 2:49 
Questionhave to access one interface methods in another interface methods. Pin
kiran janaswamy11-Apr-06 20:10
kiran janaswamy11-Apr-06 20:10 
AnswerRe: have to access one interface methods in another interface methods. Pin
Stephen Hewitt12-Apr-06 0:53
Stephen Hewitt12-Apr-06 0:53 
QuestionWhere to start. Pin
Polity4h11-Apr-06 11:24
Polity4h11-Apr-06 11:24 
QuestionHow cam I set background color of tab control Pin
SheruVishal11-Apr-06 4:30
SheruVishal11-Apr-06 4:30 
QuestionAccess Remote Folders Pin
kiran janaswamy11-Apr-06 1:36
kiran janaswamy11-Apr-06 1:36 
AnswerRe: Access Remote Folders Pin
Milton Karimbekallil11-Apr-06 11:31
Milton Karimbekallil11-Apr-06 11:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.