void __fastcall TForm1: : btn1Click (TObject * Sender)
{
Char * p=new char [20];
The delete [] p;
Strcpy (p1, "aaaaaaaaaaaaaaafsssssssssssewweeeeeeeeeeeeeeeeeeeeeeee");
P1=new char [20].//this collapse
}
The last sentence would collapse, but I why can't locate this debug window, open the call stack window, no btn1click to locate the function, if it is a single step debugging to collapse this line of code is the call stack is btn1click the function name, after debugging assembly into the new [] function call sometime after leaves the call stack window information,
I want to ask is there any way to make the call stack shows btn1Click the function, this program is run after the collapse and then enter the state testing can know this function is wrong,
CodePudding user response:
Open the codeguard, this kind of error will be promptedCodePudding user response:
This is because an exception occurs, the program has entered the Windows exception handling process, so the call stack in rtl60. BPL here, you beat a breakpoint at the front, in btnclick stackCodePudding user response: