Click here to Skip to main content
15,902,114 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem : strtok,strcpy,crashes when garbage strings are handled Pin
John R. Shaw8-Jul-05 9:32
John R. Shaw8-Jul-05 9:32 
Generalmmx help, Privileged instruction exception. Pin
Member 34198917-Jul-05 21:35
Member 34198917-Jul-05 21:35 
GeneralRe: mmx help, Privileged instruction exception. Pin
Member 34198917-Jul-05 22:52
Member 34198917-Jul-05 22:52 
QuestionIs it possible to replace tab buttons in the tab control by a bitmap? Pin
Asha Udupa7-Jul-05 20:48
Asha Udupa7-Jul-05 20:48 
AnswerRe: Is it possible to replace tab buttons in the tab control by a bitmap? Pin
ThatsAlok7-Jul-05 21:38
ThatsAlok7-Jul-05 21:38 
QuestionProblem about Drag in TreeCtrl? Pin
sharkmouse7-Jul-05 19:44
sharkmouse7-Jul-05 19:44 
AnswerRe: Problem about Drag in TreeCtrl? Pin
Nilesh K.7-Jul-05 20:15
Nilesh K.7-Jul-05 20:15 
GeneralUNICODE Pin
John R. Shaw7-Jul-05 17:17
John R. Shaw7-Jul-05 17:17 
Interesting: How do you determine if a character type is char or wchar_t at compile time without using #ifdef UNICODE (or _UNICODE)?

Examples (THAT WILL NOT WORK):
#if char_type == wchar_t
// character type is wchar_t
#else
// character type is char
#endif

#if sizeof(char_type) == sizeof(wchar_t)
// character type is wchar_t
#else
// character type is char
#endif

Is something like this even possible?

Essentialy, I am dealing with a template class that takes the character type as an argument. Therefore, I need to know character type it is.

Example:
#ifdef UNICODE
std::wout << L"some string";
#else
std::out << "some string";
#endif

The above looks reasonable, but it assumes the character type. Since it is a template and it can take any character type, whether UNICODE is defined or not, it well not work.

What I need is compiler independent text feed back from the template at runtime, regardless of the character type passed as an argument to the template. The user knows what type they passed so they already know what type of text to expect as feedback.

INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
GeneralRe: UNICODE Pin
Jose Lamas Rios7-Jul-05 18:09
Jose Lamas Rios7-Jul-05 18:09 
GeneralRe: UNICODE Pin
John R. Shaw8-Jul-05 8:47
John R. Shaw8-Jul-05 8:47 
GeneralRe: UNICODE Pin
Jose Lamas Rios8-Jul-05 10:10
Jose Lamas Rios8-Jul-05 10:10 
GeneralRe: UNICODE Pin
John R. Shaw8-Jul-05 10:55
John R. Shaw8-Jul-05 10:55 
GeneralRe: UNICODE Pin
toxcct7-Jul-05 20:21
toxcct7-Jul-05 20:21 
GeneralRe: UNICODE Pin
John R. Shaw8-Jul-05 7:09
John R. Shaw8-Jul-05 7:09 
GeneralRe: UNICODE Pin
Bob Stanneveld7-Jul-05 22:03
Bob Stanneveld7-Jul-05 22:03 
GeneralRe: UNICODE Pin
John R. Shaw8-Jul-05 8:39
John R. Shaw8-Jul-05 8:39 
GeneralRe: UNICODE Pin
Bob Stanneveld9-Jul-05 5:48
Bob Stanneveld9-Jul-05 5:48 
Generalrget r, g or b value for opengl Pin
cell517-Jul-05 16:27
cell517-Jul-05 16:27 
GeneralRe: rget r, g or b value for opengl Pin
Jose Lamas Rios7-Jul-05 16:44
Jose Lamas Rios7-Jul-05 16:44 
Generalneed help on generate report to excel Pin
firebolt777-Jul-05 16:05
firebolt777-Jul-05 16:05 
GeneralRe: need help on generate report to excel Pin
Jose Lamas Rios7-Jul-05 17:09
Jose Lamas Rios7-Jul-05 17:09 
GeneralRe: need help on generate report to excel Pin
firebolt777-Jul-05 20:03
firebolt777-Jul-05 20:03 
GeneralRe: need help on generate report to excel Pin
Jose Lamas Rios7-Jul-05 20:12
Jose Lamas Rios7-Jul-05 20:12 
GeneralRe: need help on generate report to excel Pin
firebolt777-Jul-05 20:25
firebolt777-Jul-05 20:25 
GeneralRe: need help on generate report to excel Pin
firebolt778-Jul-05 3:36
firebolt778-Jul-05 3:36 

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.