Click here to Skip to main content
15,918,976 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Header file Pin
Hamid_RT8-Apr-09 23:52
Hamid_RT8-Apr-09 23:52 
QuestionShellExecuteEx not working fine in case of Visual Studio 2008. Pin
Le@rner8-Apr-09 21:03
Le@rner8-Apr-09 21:03 
AnswerRe: ShellExecuteEx not working fine in case of Visual Studio 2008. Pin
Rajesh R Subramanian8-Apr-09 21:37
professionalRajesh R Subramanian8-Apr-09 21:37 
JokeRe: ShellExecuteEx not working fine in case of Visual Studio 2008. Pin
CPallini8-Apr-09 22:01
mveCPallini8-Apr-09 22:01 
JokeRe: ShellExecuteEx not working fine in case of Visual Studio 2008. Pin
Rajesh R Subramanian8-Apr-09 22:20
professionalRajesh R Subramanian8-Apr-09 22:20 
AnswerRe: ShellExecuteEx not working fine in case of Visual Studio 2008. Pin
Hamid_RT8-Apr-09 23:56
Hamid_RT8-Apr-09 23:56 
QuestionBasic Segmentation fault help needed Pin
Brandon Ramirez8-Apr-09 20:56
Brandon Ramirez8-Apr-09 20:56 
QuestionRe: Basic Segmentation fault help needed Pin
CPallini8-Apr-09 21:27
mveCPallini8-Apr-09 21:27 
Brandon Ramirez wrote:
p1->key = new char[strlen(k)+1];
p1->data = new char[strlen(d)+1];
strcpy(p1->key,k);
strcpy(p1->data,d);

Why didn't you check if memory allocation succeeded?


Brandon Ramirez wrote:

return;

p1=Start;

while(p1!=NULL) {

if ( (i=strcmp(k,p1->key)) == 0 ) {
delete [] p1->data;
p1->data = new char[strlen(d)+1];
strcpy(p1->data,d);
return;
}


What is the purpose of the return; line? Do you know the code below it will never be executed?
Smile | :)

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]

QuestionRe: Basic Segmentation fault help needed Pin
Brandon Ramirez8-Apr-09 21:46
Brandon Ramirez8-Apr-09 21:46 
AnswerRe: Basic Segmentation fault help needed Pin
CPallini8-Apr-09 21:58
mveCPallini8-Apr-09 21:58 
GeneralRe: Basic Segmentation fault help needed Pin
Brandon Ramirez8-Apr-09 22:11
Brandon Ramirez8-Apr-09 22:11 
GeneralRe: Basic Segmentation fault help needed Pin
CPallini8-Apr-09 22:22
mveCPallini8-Apr-09 22:22 
AnswerRe: Basic Segmentation fault help needed Pin
Stuart Dootson8-Apr-09 23:13
professionalStuart Dootson8-Apr-09 23:13 
GeneralRe: Basic Segmentation fault help needed Pin
CPallini8-Apr-09 23:24
mveCPallini8-Apr-09 23:24 
QuestionRe: Basic Segmentation fault help needed Pin
David Crow9-Apr-09 3:19
David Crow9-Apr-09 3:19 
Questionpointer on class Pin
durban28-Apr-09 20:34
durban28-Apr-09 20:34 
AnswerRe: pointer on class Pin
«_Superman_»8-Apr-09 20:37
professional«_Superman_»8-Apr-09 20:37 
AnswerRe: pointer on class Pin
Paresh Chitte8-Apr-09 21:04
Paresh Chitte8-Apr-09 21:04 
AnswerRe: pointer on class Pin
KarstenK8-Apr-09 21:17
mveKarstenK8-Apr-09 21:17 
GeneralRe: pointer on class Pin
durban29-Apr-09 21:34
durban29-Apr-09 21:34 
GeneralRe: pointer on class Pin
KarstenK13-Apr-09 22:07
mveKarstenK13-Apr-09 22:07 
GeneralRe: pointer on class Pin
ThatsAlok8-Apr-09 22:59
ThatsAlok8-Apr-09 22:59 
QuestionRun an exe from ShellExecute with administrator permission in Vista. Pin
Le@rner8-Apr-09 19:59
Le@rner8-Apr-09 19:59 
JokeRe: Run an exe from ShellExecute with administrator permission in Vista. Pin
«_Superman_»8-Apr-09 20:02
professional«_Superman_»8-Apr-09 20:02 
AnswerRe: Run an exe from ShellExecute with administrator permission in Vista. Pin
KarstenK8-Apr-09 21:18
mveKarstenK8-Apr-09 21:18 

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.