stefanhubert
Programmer
PROCESSOR: 133 MHz
OS: MS DOS 6.22
COMPILER: Borland Turbo C++ 3.0
Hi there,
This is the first time I use the Borland Turbo C++ environment.
This is the first I code a more complex application C++.
I make use of some classes.
My code behaves really strange. Dependent on the sequence and complexity of the code I test my classes/modules with, ONE OF the following behaviours occures:
-On a certain position I call the new operator to allocate an array of characters. Executing this instruction, the content of an other string becomes overwritten, that is not even involved in that statement (line of code). (This does not happen every time, I call the function containing that certain statement, but each time, i debug my program, at the same position in my program's progress.)
-I call strlen(..) on a certain position in my program. That courses the string's content to become overwirtten. Like above, this does not occur every time I call strlen() but each time at the same state of progress of my program.
-Presumabely the function call stack becomes damaged. Some of the bottom entries ( Showed in the Debug/Call Stack.. -dialog )disappear at a certain line of code.
I currently imply that I made a mistake, and have to find it. Other possibilities are an error of the copmiler or others....
In case this sounds familiar to somebody: I am graceful to every kinds of clues, hints!!! since I already spent a couple of days to find this error, and the customer and my boss urge to finish this project, not to talk about of my own will to get that out of my way.
thanks a lot in advance,
Stefan Hubert
P.S.
Since my source code is still quite complex (a couple of classes are involved) I do not include source code here, but of course I could send it, in case sombody wants to have a look at it, what was certainly necessary in order to try to find the reason.
OS: MS DOS 6.22
COMPILER: Borland Turbo C++ 3.0
Hi there,
This is the first time I use the Borland Turbo C++ environment.
This is the first I code a more complex application C++.
I make use of some classes.
My code behaves really strange. Dependent on the sequence and complexity of the code I test my classes/modules with, ONE OF the following behaviours occures:
-On a certain position I call the new operator to allocate an array of characters. Executing this instruction, the content of an other string becomes overwritten, that is not even involved in that statement (line of code). (This does not happen every time, I call the function containing that certain statement, but each time, i debug my program, at the same position in my program's progress.)
-I call strlen(..) on a certain position in my program. That courses the string's content to become overwirtten. Like above, this does not occur every time I call strlen() but each time at the same state of progress of my program.
-Presumabely the function call stack becomes damaged. Some of the bottom entries ( Showed in the Debug/Call Stack.. -dialog )disappear at a certain line of code.
I currently imply that I made a mistake, and have to find it. Other possibilities are an error of the copmiler or others....
In case this sounds familiar to somebody: I am graceful to every kinds of clues, hints!!! since I already spent a couple of days to find this error, and the customer and my boss urge to finish this project, not to talk about of my own will to get that out of my way.
thanks a lot in advance,
Stefan Hubert
P.S.
Since my source code is still quite complex (a couple of classes are involved) I do not include source code here, but of course I could send it, in case sombody wants to have a look at it, what was certainly necessary in order to try to find the reason.