PDA

View Full Version : So many a question...


Pattielli
May23-04, 08:01 AM
My program compiled without any errors...I tried to debug and just on the way to finishing the debugging process, it unforutunately ran into memory access violation. I turned on the memory but there were only question marks, I checked the call stack and as the picture enclosed below already showed you, main function and mainCRTStartup were there, written in a way I don't really understand...
Please take a look at it, I have two questions which I am looking for some ideas intructions or solutions to. What is written in that call stack window ? And why are there so many question marks in the memory window ?

Thank you very much,

Pattielli
May23-04, 08:05 AM
I think my program didn't work because of my errors in coding, i made this question only to ask for some information about MS VC++ functions which I am really new to especially the debugger...
If you have any ideas, please just tell me...

Thank you

dduardo
May23-04, 08:28 AM
The easiest way to find bugs in your code is to setup a breakpoint and walk through the program step by step. You can also drag variables to the watch area and see how they change values.

Pattielli
May23-04, 08:34 AM
Thank you, i set up a break point and jumped to the code that led to the error but still unable to fix it...

I have some questions as mentioned in my original post about what is written in the image that I really needs some explanation....if you don't care spending some moments having a look at it...
Again thank you very much,

dduardo
May23-04, 09:12 AM
The call stack is just what it is - a stack filled with function calls. For instance, when you have a recursive function, each time the function is called it is pushed onto the stack. Everytime you exit a function it is popped off the stack. It is basically a way for the computer to track where you are and where it has to go when a function is exited.

The questions marks mean that there is nothing there or the memory locations are protected.

Pattielli
May24-04, 12:59 AM
Thank you for your explanation