about array creation
-
Dear all in visual C++ 6 I want to create an array of class objects like this : declaration in header file : CStateMachine *state[NumberOfChannels]; in constructor : for (int i=0; i < NumberOfChannels ; i++) { states[i] = new CStateMachine(this); } in destructor : for (int i=0; i < NumberOfChannels ; i++) { delete states[i] ; } But when I want to delete the file I get the following error DAMAGE : after normal block (#210) at 0x13243214 Press any key to debug the application Abort, retry, Ignore. May you please help me to find the reason of this problem. Regards
-
Dear all in visual C++ 6 I want to create an array of class objects like this : declaration in header file : CStateMachine *state[NumberOfChannels]; in constructor : for (int i=0; i < NumberOfChannels ; i++) { states[i] = new CStateMachine(this); } in destructor : for (int i=0; i < NumberOfChannels ; i++) { delete states[i] ; } But when I want to delete the file I get the following error DAMAGE : after normal block (#210) at 0x13243214 Press any key to debug the application Abort, retry, Ignore. May you please help me to find the reason of this problem. Regards
"But when I want to delete the classes I get the following error" is correct.
-
Dear all in visual C++ 6 I want to create an array of class objects like this : declaration in header file : CStateMachine *state[NumberOfChannels]; in constructor : for (int i=0; i < NumberOfChannels ; i++) { states[i] = new CStateMachine(this); } in destructor : for (int i=0; i < NumberOfChannels ; i++) { delete states[i] ; } But when I want to delete the file I get the following error DAMAGE : after normal block (#210) at 0x13243214 Press any key to debug the application Abort, retry, Ignore. May you please help me to find the reason of this problem. Regards