Click here to Skip to main content
15,914,066 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionrecognition voice Pin
andreas_6357-Dec-06 23:38
andreas_6357-Dec-06 23:38 
QuestionTesting if a string is empty Pin
Programm3r7-Dec-06 22:16
Programm3r7-Dec-06 22:16 
AnswerRe: Testing if a string is empty Pin
prasad_som7-Dec-06 22:25
prasad_som7-Dec-06 22:25 
AnswerRe: Testing if a string is empty Pin
joelgarabedian7-Dec-06 22:26
joelgarabedian7-Dec-06 22:26 
AnswerRe: Testing if a string is empty Pin
CPallini7-Dec-06 22:30
mveCPallini7-Dec-06 22:30 
AnswerRe: Testing if a string is empty Pin
Christian Graus7-Dec-06 22:41
protectorChristian Graus7-Dec-06 22:41 
GeneralThank you all very much :) Pin
Programm3r7-Dec-06 22:43
Programm3r7-Dec-06 22:43 
GeneralRe: Thank you all very much :) Pin
kakan7-Dec-06 23:32
professionalkakan7-Dec-06 23:32 
In addition to all the things said, it's always good programming practice to initialize the variables before testing on them.

IMO, one common reason for problem is that memory is allocated differently in debug and release mode.
In debug, the allocated buffer becomes filled with null-bytes.
In release-build, it isn't. It's filled with junk characters (whatever is on the stack).

So (without initializing) testing for '\0' at index 0 works in debug mode, but not in release mode.
That's something to watch out for..


Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

GeneralI agree completely. Pin
CPallini8-Dec-06 3:13
mveCPallini8-Dec-06 3:13 
Questionincluding C++ header file in .C file Pin
Shailesh Ha7-Dec-06 21:48
Shailesh Ha7-Dec-06 21:48 
AnswerRe: including C++ header file in .C file Pin
prasad_som7-Dec-06 22:30
prasad_som7-Dec-06 22:30 
AnswerRe: including C++ header file in .C file Pin
Christian Graus7-Dec-06 22:44
protectorChristian Graus7-Dec-06 22:44 
AnswerRe: including C++ header file in .C file Pin
CPallini7-Dec-06 22:57
mveCPallini7-Dec-06 22:57 
AnswerRe: including C++ header file in .C file Pin
vijay_aroli8-Dec-06 2:39
vijay_aroli8-Dec-06 2:39 
AnswerRe: including C++ header file in .C file Pin
Zac Howland8-Dec-06 5:01
Zac Howland8-Dec-06 5:01 
QuestionWhy is my C program crashing? Pin
<color>Aljechin 7-Dec-06 21:26
<color>Aljechin 7-Dec-06 21:26 
AnswerRe: Why is my C program crashing? Pin
Naveen7-Dec-06 21:30
Naveen7-Dec-06 21:30 
GeneralRe: Why is my C program crashing? Pin
<color>Aljechin 7-Dec-06 21:33
<color>Aljechin 7-Dec-06 21:33 
GeneralRe: Why is my C program crashing? Pin
kakan7-Dec-06 21:39
professionalkakan7-Dec-06 21:39 
GeneralRe: Why is my C program crashing? Pin
<color>Aljechin 7-Dec-06 21:42
<color>Aljechin 7-Dec-06 21:42 
GeneralRe: Why is my C program crashing? Pin
kakan7-Dec-06 21:48
professionalkakan7-Dec-06 21:48 
GeneralRe: Why is my C program crashing? Pin
<color>Aljechin 7-Dec-06 21:56
<color>Aljechin 7-Dec-06 21:56 
GeneralRe: Why is my C program crashing? Pin
kakan7-Dec-06 22:15
professionalkakan7-Dec-06 22:15 
GeneralRe: Why is my C program crashing? Pin
CodeMak7-Dec-06 22:22
CodeMak7-Dec-06 22:22 
GeneralRe: Why is my C program crashing? Pin
Christian Graus7-Dec-06 22:43
protectorChristian Graus7-Dec-06 22:43 

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.