Mail Archives: djgpp/1998/09/04/18:54:09
Destination: "Mars" <mars AT homemail DOT com>
From: Gruber Gerhard
Group: comp.os.msdos.djgpp
Date: 4 Sep 1998 18:52:30 +0100:
>It was not me. This is another problem.
Oh. Same subject line different problem. :)
>This is the signiture of the class:
Well, the calls is with 99.9% surity (is this the word?) not the problem.
Rather your problem lies somewhere in your code. I'm pretty sure that you
overwrite your stack somewhere and thats why changes in the class might crash
your program. Because the stack layout is different with the new class and it
happens that the new values crash whereas the previous values went unnoticed
(but are still there). So check your code for parts where you use automatic
variables (specifically arrays) where you might go beyond array boundaries.
Something like that might cause your problem:
foo()
{
char s[5];
strcpy(s, "Very long string doesnt fit in this short array");
}
Another problem might be that you are shooting with wild pointers. :) Are you
sure you initialized all pointers prior to using them? Assigning a default
value of NULL often helps in detecting such errors. I'd recommend to do this
on all pointers.
--
Bye,
Gerhard
email: sparhawk AT eunet DOT at
g DOT gruber AT sis DOT co DOT at
Spelling corrections are appreciated.
- Raw text -