Click here to Skip to main content
15,891,951 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." Pin
Abhi Lahare18-Dec-09 4:35
Abhi Lahare18-Dec-09 4:35 
GeneralRe: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." Pin
Alan Kurlansky18-Dec-09 10:46
Alan Kurlansky18-Dec-09 10:46 
QuestionHow to check whether a char pointer is an empty string? Pin
dipuks17-Dec-09 10:05
dipuks17-Dec-09 10:05 
AnswerRe: How to check whether a char pointer is an empty string? Pin
krmed17-Dec-09 10:36
krmed17-Dec-09 10:36 
GeneralRe: How to check whether a char pointer is an empty string? Pin
harold aptroot17-Dec-09 10:58
harold aptroot17-Dec-09 10:58 
GeneralRe: How to check whether a char pointer is an empty string? Pin
krmed17-Dec-09 11:34
krmed17-Dec-09 11:34 
GeneralRe: How to check whether a char pointer is an empty string? Pin
Tim Craig17-Dec-09 17:54
Tim Craig17-Dec-09 17:54 
AnswerRe: How to check whether a char pointer is an empty string? Pin
CPallini17-Dec-09 11:01
mveCPallini17-Dec-09 11:01 
you may check for an empty string with
if (strlen(p)==0)
{
//..
}


the above check, of course, assumes p pointing to a valid string (empty string is a valid one).
i.e. such code doesn't check if p is a valid pointer, to spot the difference, try:
char *p, *q;
p="";
q=NULL;

printf("strlen(p)=%d\n", strlen(p));
printf("strlen(q)=%d\n", strlen(q));


If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

AnswerRe: How to check whether a char pointer is an empty string? Pin
Fatbuddha 117-Dec-09 22:14
Fatbuddha 117-Dec-09 22:14 
QuestionNo Idea why the linker is giving error Pin
Larry Mills Sr17-Dec-09 9:36
Larry Mills Sr17-Dec-09 9:36 
AnswerRe: No Idea why the linker is giving error Pin
krmed17-Dec-09 10:39
krmed17-Dec-09 10:39 
GeneralRe: No Idea why the linker is giving error Pin
Larry Mills Sr18-Dec-09 4:48
Larry Mills Sr18-Dec-09 4:48 
GeneralRe: No Idea why the linker is giving error Pin
krmed18-Dec-09 5:02
krmed18-Dec-09 5:02 
GeneralRe: No Idea why the linker is giving error Pin
Larry Mills Sr18-Dec-09 5:29
Larry Mills Sr18-Dec-09 5:29 
GeneralRe: No Idea why the linker is giving error Pin
krmed18-Dec-09 5:38
krmed18-Dec-09 5:38 
GeneralRe: No Idea why the linker is giving error Pin
Larry Mills Sr18-Dec-09 5:42
Larry Mills Sr18-Dec-09 5:42 
QuestionError Pin
lgatcodeproject17-Dec-09 3:12
lgatcodeproject17-Dec-09 3:12 
AnswerRe: Error Pin
Abhi Lahare17-Dec-09 3:27
Abhi Lahare17-Dec-09 3:27 
AnswerRe: Error Pin
Fatbuddha 117-Dec-09 3:28
Fatbuddha 117-Dec-09 3:28 
AnswerRe: Error Pin
Stephen Hewitt17-Dec-09 3:32
Stephen Hewitt17-Dec-09 3:32 
JokeRe: Error Pin
Fatbuddha 117-Dec-09 3:37
Fatbuddha 117-Dec-09 3:37 
AnswerRe: Error Pin
transoft17-Dec-09 7:00
transoft17-Dec-09 7:00 
AnswerRe: Error Pin
Y_miao17-Dec-09 12:45
Y_miao17-Dec-09 12:45 
GeneralRe: Error Pin
Tim Craig17-Dec-09 18:01
Tim Craig17-Dec-09 18:01 
AnswerRe: Error Pin
Maxwell Chen17-Dec-09 21:49
Maxwell Chen17-Dec-09 21:49 

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.