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

C / C++ / MFC

 
GeneralCList troubles Pin
Dor20-Nov-02 16:40
Dor20-Nov-02 16:40 
GeneralRe: CList troubles Pin
Christian Graus20-Nov-02 16:59
protectorChristian Graus20-Nov-02 16:59 
GeneralRe: CList troubles Pin
Michael P Butler20-Nov-02 22:09
Michael P Butler20-Nov-02 22:09 
GeneralRe: CList troubles Pin
Alexandru Savescu21-Nov-02 2:14
Alexandru Savescu21-Nov-02 2:14 
Question.NET Profiler? Pin
Anonymous20-Nov-02 16:32
Anonymous20-Nov-02 16:32 
QuestionCan someone please explain this error to me? Pin
georgiek5020-Nov-02 16:19
georgiek5020-Nov-02 16:19 
AnswerRe: Can someone please explain this error to me? Pin
Paul M Watt20-Nov-02 16:46
mentorPaul M Watt20-Nov-02 16:46 
GeneralRe: Can someone please explain this error to me? Pin
georgiek5020-Nov-02 17:07
georgiek5020-Nov-02 17:07 
Ok, I see, but I don't know why this is happening in my program...It crashes after this function call but the strange thing is this. This function add strings to a linked list. First it checks the linked list to make sure that the string isn't already there, if it doesn't find it then it adds it. The program crashes only when it finds a match in the linked list and the string is more than 37 chars in length. Anything under that is OK. That is what is confusing me. Maybe you can have a look at this code?

void movie_list::AddTo_Gimme(char szMovieName[][51], int iNumber)
{
movie_list_element *pSearch;
char szBuffer[80];
int x;

for (x = 0; x < iNumber; x++)
{
pSearch = first_movie;

// Search for a match
while (pSearch != NULL)
{
if ( strcmp(szMovieName[x], pSearch->movie_name) == 0 )
break;
else
pSearch = pSearch->next_movie;
}

if (pSearch == NULL)
{
// No match; Add the movie to the head of the list
movie_list_element *NewMovie;
NewMovie = new movie_list_element;

NewMovie->movie_name = strdup(szMovieName[x]);
NewMovie->next_movie = first_movie;
first_movie = NewMovie;
}
}
}

Thanks for the help so far.
GeneralRe: Can someone please explain this error to me? Pin
georgiek5020-Nov-02 17:20
georgiek5020-Nov-02 17:20 
GeneralRe: Can someone please explain this error to me? Pin
Paul M Watt20-Nov-02 18:50
mentorPaul M Watt20-Nov-02 18:50 
GeneralPSOLA Algorithm Pin
Sailor11120-Nov-02 14:40
Sailor11120-Nov-02 14:40 
GeneralAnchor Object for CDialog Pin
MattG20-Nov-02 13:33
MattG20-Nov-02 13:33 
GeneralRe: Anchor Object for CDialog Pin
Christian Graus20-Nov-02 14:29
protectorChristian Graus20-Nov-02 14:29 
GeneralRe: Anchor Object for CDialog Pin
Taka Muraoka20-Nov-02 16:57
Taka Muraoka20-Nov-02 16:57 
GeneralRe: Anchor Object for CDialog Pin
MattG22-Nov-02 12:13
MattG22-Nov-02 12:13 
GeneralRe: Anchor Object for CDialog Pin
Joaquín M López Muñoz20-Nov-02 21:05
Joaquín M López Muñoz20-Nov-02 21:05 
GeneralRe: Anchor Object for CDialog Pin
MattG22-Nov-02 12:14
MattG22-Nov-02 12:14 
GeneralRe: Anchor Object for CDialog Pin
Gary R. Wheeler23-Nov-02 5:21
Gary R. Wheeler23-Nov-02 5:21 
GeneralMultiple Page Printing Pin
act_x20-Nov-02 12:57
act_x20-Nov-02 12:57 
GeneralRe: Multiple Page Printing Pin
Roger Allen21-Nov-02 2:16
Roger Allen21-Nov-02 2:16 
GeneralWhere to put MFC DLL's Pin
paulb20-Nov-02 12:12
paulb20-Nov-02 12:12 
GeneralRe: Where to put MFC DLL's Pin
Christian Graus20-Nov-02 12:33
protectorChristian Graus20-Nov-02 12:33 
GeneralRe: Where to put MFC DLL's Pin
User 988520-Nov-02 13:13
User 988520-Nov-02 13:13 
GeneralRe: Where to put MFC DLL's Pin
Christian Graus20-Nov-02 13:16
protectorChristian Graus20-Nov-02 13:16 
GeneralRe: Where to put MFC DLL's Pin
Jim A. Johnson20-Nov-02 12:38
Jim A. Johnson20-Nov-02 12:38 

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.