Click here to Skip to main content
15,913,836 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: select multiple files instead of 1 only Pin
johnmc9394026-Mar-06 16:56
johnmc9394026-Mar-06 16:56 
QuestionHow to use IDispatch Interface in MFC Pin
a_day26-Mar-06 10:19
a_day26-Mar-06 10:19 
AnswerRe: How to use IDispatch Interface in MFC Pin
Hamid_RT26-Mar-06 17:58
Hamid_RT26-Mar-06 17:58 
GeneralRe: How to use IDispatch Interface in MFC Pin
a_day26-Mar-06 22:55
a_day26-Mar-06 22:55 
Questionmd5 hashing fails one 1 computer out a hundred Pin
urizn26-Mar-06 8:38
urizn26-Mar-06 8:38 
AnswerRe: md5 hashing fails one 1 computer out a hundred Pin
Jack Puppy26-Mar-06 9:45
Jack Puppy26-Mar-06 9:45 
AnswerRe: md5 hashing fails one 1 computer out a hundred Pin
Michael Dunn26-Mar-06 12:29
sitebuilderMichael Dunn26-Mar-06 12:29 
Questionnew and delete Pin
Waldermort26-Mar-06 4:51
Waldermort26-Mar-06 4:51 
I have used these operators numerous times without any problems at all. Until today that is.
char *bin;
int size = rec.comment[x].size();
bin = new char[size];

strcpy(bin,rec.comment[x].c_str() );

blob.setBinary((unsigned char*)bin, strlen(bin) );

sprintf(tmp,"update data set data=%% where student_id=%i and exam=%i;",
	rec.student_id,
	x );
buf.format(tmp,blob.getEncoded() );
db.execDML(buf);

delete bin;

Maybe I am doing something wrong, but all works well until it comes to delete bin. The program crashes with an error I have never seen before "DAMAGE: after normal block(#9160)".

Could somebody please point out what I may be doing wrong and what is the meaning of this error.

Thankyou.
AnswerRe: new and delete Pin
Justin Tay26-Mar-06 5:48
Justin Tay26-Mar-06 5:48 
GeneralRe: new and delete Pin
Waldermort26-Mar-06 6:58
Waldermort26-Mar-06 6:58 
GeneralRe: new and delete Pin
RChin26-Mar-06 7:34
RChin26-Mar-06 7:34 
GeneralRe: new and delete Pin
PJ Arends26-Mar-06 10:11
professionalPJ Arends26-Mar-06 10:11 
AnswerRe: new and delete Pin
Stephen Hewitt26-Mar-06 11:33
Stephen Hewitt26-Mar-06 11:33 
AnswerRe: new and delete Pin
Axter26-Mar-06 14:53
professionalAxter26-Mar-06 14:53 
GeneralRe: new and delete Pin
sunit526-Mar-06 17:51
sunit526-Mar-06 17:51 
GeneralRe: new and delete Pin
Eytukan26-Mar-06 21:55
Eytukan26-Mar-06 21:55 
GeneralRe: new and delete Pin
sunit527-Mar-06 0:58
sunit527-Mar-06 0:58 
GeneralRe: new and delete Pin
Waldermort27-Mar-06 1:59
Waldermort27-Mar-06 1:59 
GeneralRe: new and delete Pin
sunit527-Mar-06 18:28
sunit527-Mar-06 18:28 
QuestionQuick answer would be great Pin
Waldermort26-Mar-06 3:14
Waldermort26-Mar-06 3:14 
AnswerRe: Quick answer would be great Pin
toxcct26-Mar-06 3:44
toxcct26-Mar-06 3:44 
AnswerRe: Quick answer would be great Pin
eli1502197926-Mar-06 3:45
eli1502197926-Mar-06 3:45 
GeneralRe: Quick answer would be great Pin
Waldermort26-Mar-06 3:54
Waldermort26-Mar-06 3:54 
QuestionExporting functions with strings Pin
mosquitooth26-Mar-06 1:49
mosquitooth26-Mar-06 1:49 
AnswerRe: Exporting functions with strings Pin
Giannakakis Kostas26-Mar-06 18:35
professionalGiannakakis Kostas26-Mar-06 18:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.