Click here to Skip to main content
15,913,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to retrieve the IP address of a system? Pin
Malini Nair19-Dec-06 1:38
Malini Nair19-Dec-06 1:38 
AnswerRe: how to retrieve the IP address of a system? Pin
vimal_q19-Dec-06 2:00
vimal_q19-Dec-06 2:00 
AnswerRe: how to retrieve the IP address of a system? Pin
Mila02519-Dec-06 2:37
Mila02519-Dec-06 2:37 
Questionunicode Pin
radhika2819-Dec-06 1:12
radhika2819-Dec-06 1:12 
AnswerRe: unicode Pin
Naveen19-Dec-06 1:23
Naveen19-Dec-06 1:23 
GeneralRe: unicode Pin
Stephen Hewitt19-Dec-06 16:01
Stephen Hewitt19-Dec-06 16:01 
GeneralRe: unicode Pin
Rajesh R Subramanian19-Dec-06 20:40
professionalRajesh R Subramanian19-Dec-06 20:40 
GeneralRe: unicode Pin
Stephen Hewitt20-Dec-06 11:54
Stephen Hewitt20-Dec-06 11:54 
Defining both _UNICODE and _MBCS may cause problems if you use "tchar.h". For example many people use the _T macro and the "_t" string functions so the same code can be used for Unicode and non-Unicode builds. Take the _tcscmp function for example. Here's a table from the documentation for this function:
|----------------------------------------------------------------------------
|TCHAR.H routine|_UNICODE & MBCS not defined|_MBCS defined |_UNICODE defined|
|---------------------------------------------------------------------------|
|_tcscmp        |strcmp                     |_mbscmp       |wcscmp          |
-----------------------------------------------------------------------------


As you can see the results are not specified if both are defined. Already defining both leaves you in the reals of undocumented behaviour. In this case, with my header files, the Unicode version will be used. However, It's never a good idea to reply on undocumented behaviour in computer programming if you don't have a compelling reason.

In general, I remove the _MBCS.


Steve

GeneralRe: unicode Pin
Rajesh R Subramanian19-Dec-06 19:59
professionalRajesh R Subramanian19-Dec-06 19:59 
GeneralRe: unicode Pin
Naveen19-Dec-06 20:19
Naveen19-Dec-06 20:19 
GeneralRe: unicode Pin
Rajesh R Subramanian19-Dec-06 20:44
professionalRajesh R Subramanian19-Dec-06 20:44 
GeneralRe: unicode Pin
Naveen19-Dec-06 20:57
Naveen19-Dec-06 20:57 
QuestionHelp me please Pin
ShaluMalu19-Dec-06 1:01
ShaluMalu19-Dec-06 1:01 
QuestionRe: Help me please Pin
David Crow19-Dec-06 2:54
David Crow19-Dec-06 2:54 
Questionprepared sql statement Pin
onlyformfc@gmail.com19-Dec-06 0:47
onlyformfc@gmail.com19-Dec-06 0:47 
QuestionCreate & set formula field in crystal report using VC++ Pin
Karismatic19-Dec-06 0:02
Karismatic19-Dec-06 0:02 
QuestionMax. value of array in Windows 32 system Pin
cy163@hotmail.com18-Dec-06 23:51
cy163@hotmail.com18-Dec-06 23:51 
AnswerRe: Max. value of array in Windows 32 system Pin
CPallini19-Dec-06 0:03
mveCPallini19-Dec-06 0:03 
GeneralRe: Max. value of array in Windows 32 system Pin
Jörgen Sigvardsson19-Dec-06 0:05
Jörgen Sigvardsson19-Dec-06 0:05 
GeneralRe: Max. value of array in Windows 32 system Pin
CPallini19-Dec-06 0:13
mveCPallini19-Dec-06 0:13 
AnswerRe: Max. value of array in Windows 32 system [modified] Pin
Jörgen Sigvardsson19-Dec-06 0:05
Jörgen Sigvardsson19-Dec-06 0:05 
GeneralRe: Max. value of array in Windows 32 system Pin
Mark Salsbery19-Dec-06 7:45
Mark Salsbery19-Dec-06 7:45 
GeneralRe: Max. value of array in Windows 32 system Pin
Jörgen Sigvardsson19-Dec-06 9:37
Jörgen Sigvardsson19-Dec-06 9:37 
Questionhi how to find no of files in a folder Pin
chethu66518-Dec-06 23:43
chethu66518-Dec-06 23:43 
AnswerRe: hi how to find no of files in a folder Pin
_AnsHUMAN_ 18-Dec-06 23:47
_AnsHUMAN_ 18-Dec-06 23:47 

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.