Click here to Skip to main content
15,886,026 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: what will happen when i terminate a process? Pin
kilt14-Sep-09 2:27
kilt14-Sep-09 2:27 
QuestionMatching function for the code Pin
Waldemar Ork10-Sep-09 9:21
Waldemar Ork10-Sep-09 9:21 
AnswerRe: Matching function for the code Pin
Selvam R10-Sep-09 9:40
professionalSelvam R10-Sep-09 9:40 
AnswerRe: Matching function for the code Pin
Maximilien10-Sep-09 9:43
Maximilien10-Sep-09 9:43 
AnswerRe: Matching function for the code Pin
Stuart Dootson10-Sep-09 11:08
professionalStuart Dootson10-Sep-09 11:08 
GeneralRe: Matching function for the code Pin
Waldemar Ork12-Sep-09 8:18
Waldemar Ork12-Sep-09 8:18 
Questionstd::wstring cannot convert from char[3] to class std::basic_string................. Pin
egerving10-Sep-09 8:25
egerving10-Sep-09 8:25 
AnswerRe: std::wstring cannot convert from char[3] to class std::basic_string................. Pin
Cedric Moonen10-Sep-09 8:34
Cedric Moonen10-Sep-09 8:34 
egerving wrote:
Anyone know what the problem is here?


Yes, written like that "MU" is a char array, and not a WChar array. You have to write it this way:
_T("MU") in order to be unicode independant.

First thing, I really suggest you read this excellent article[^], you'll get a much better grasp on unicode ans string conversions.

Second point, I suggest you define your strings this way:
#if defined _UNICODE || defined UNICODE
	typedef std::wstring TMyString;
#else
	typedef std::string TMyString;
#endif


So, everywhere later in your program, use TMyString instead of wstring or string. This way, you will remain independant of the UNICODE settings.

Cédric Moonen
Software developer

Charting control [v2.0]
OpenGL game tutorial in C++

GeneralRe: std::wstring cannot convert from char[3] to class std::basic_string................. Pin
egerving10-Sep-09 8:53
egerving10-Sep-09 8:53 
GeneralRe: std::wstring cannot convert from char[3] to class std::basic_string................. Pin
Rajesh R Subramanian10-Sep-09 9:12
professionalRajesh R Subramanian10-Sep-09 9:12 
AnswerRe: std::wstring cannot convert from char[3] to class std::basic_string................. Pin
Stuart Dootson10-Sep-09 11:05
professionalStuart Dootson10-Sep-09 11:05 
Questionfwrite for unicode big endian Pin
Rakesh510-Sep-09 8:17
Rakesh510-Sep-09 8:17 
AnswerRe: fwrite for unicode big endian Pin
Selvam R10-Sep-09 8:53
professionalSelvam R10-Sep-09 8:53 
GeneralRe: fwrite for unicode big endian Pin
Rakesh510-Sep-09 9:08
Rakesh510-Sep-09 9:08 
GeneralRe: fwrite for unicode big endian Pin
Selvam R10-Sep-09 9:34
professionalSelvam R10-Sep-09 9:34 
Questionreturning by reference and polymorphism Pin
paolosh10-Sep-09 8:11
paolosh10-Sep-09 8:11 
AnswerRe: returning by reference and polymorphism Pin
paolosh10-Sep-09 9:46
paolosh10-Sep-09 9:46 
AnswerRe: returning by reference and polymorphism Pin
Iain Clarke, Warrior Programmer10-Sep-09 9:48
Iain Clarke, Warrior Programmer10-Sep-09 9:48 
AnswerRe: returning by reference and polymorphism Pin
Iain Clarke, Warrior Programmer10-Sep-09 9:49
Iain Clarke, Warrior Programmer10-Sep-09 9:49 
AnswerRe: returning by reference and polymorphism Pin
CPallini10-Sep-09 9:59
mveCPallini10-Sep-09 9:59 
GeneralRe: returning by reference and polymorphism Pin
paolosh10-Sep-09 11:35
paolosh10-Sep-09 11:35 
Questiontic tac toe Pin
sam_200910-Sep-09 5:18
sam_200910-Sep-09 5:18 
QuestionRe: tic tac toe Pin
David Crow10-Sep-09 5:20
David Crow10-Sep-09 5:20 
AnswerRe: tic tac toe Pin
PIEBALDconsult10-Sep-09 5:58
mvePIEBALDconsult10-Sep-09 5:58 
AnswerRe: tic tac toe Pin
Keith Barrow10-Sep-09 5:26
professionalKeith Barrow10-Sep-09 5:26 

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.