Click here to Skip to main content
14,449,862 members

C / C++ / MFC

 
GeneralRe: strcpy dilemma - it works half way Pin
CPallini4-Aug-15 7:54
mveCPallini4-Aug-15 7:54 
GeneralSOLVED Re: strcpy dilemma - it works half way Pin
Vaclav_4-Aug-15 8:41
MemberVaclav_4-Aug-15 8:41 
AnswerRe: strcpy dilemma - it works half way Pin
Arthur V. Ratz13-Aug-15 19:54
mvaArthur V. Ratz13-Aug-15 19:54 
QuestionMsbuild for VC++ project having path errors Pin
code_az3-Aug-15 13:54
Membercode_az3-Aug-15 13:54 
Questionruntime error due to corruption of heap Pin
Member 93502372-Aug-15 23:22
MemberMember 93502372-Aug-15 23:22 
AnswerRe: runtime error due to corruption of heap Pin
Member 93502372-Aug-15 23:33
MemberMember 93502372-Aug-15 23:33 
SuggestionRe: runtime error due to corruption of heap Pin
David Crow3-Aug-15 3:12
MemberDavid Crow3-Aug-15 3:12 
AnswerRe: runtime error due to corruption of heap Pin
Daniel Pfeffer3-Aug-15 1:52
professionalDaniel Pfeffer3-Aug-15 1:52 
This sort of error is caused by code overwriting the beginning (or end) of a heap block, and corrupting the heap control structures. One way to find such a problem is to wrap each of your blocks in a "signature" (see below), and periodically check that the "signature" is valid.

Original structure:
class foo
{
   int  baz;
   char bar;
};

New structure:
class foo
{
   long sig1;
   int  baz;
   char bar;
   long sig2;
};

Note that you can use the constructor to initialize the signature, and the destructor to check whether the signatures have changed. Your methods can check the validity of the signatures before performing any operations. You can also modify the signatures in the destructor, in order to catch accesses to freed memory.

A library of this sort is a basic tool for any C++ programmer. If you don't have such a library in your toolbox - write one!
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.

--Winston Churchill

AnswerRe: runtime error due to corruption of heap Pin
Jochen Arndt3-Aug-15 3:13
professionalJochen Arndt3-Aug-15 3:13 
QuestionConvert to ASCII ? Pin
Vaclav_1-Aug-15 4:52
MemberVaclav_1-Aug-15 4:52 
AnswerRe: Convert to ASCII ? Pin
CPallini1-Aug-15 5:15
mveCPallini1-Aug-15 5:15 
AnswerRe: Convert to ASCII ? Pin
Richard MacCutchan1-Aug-15 5:33
communityengineerRichard MacCutchan1-Aug-15 5:33 
GeneralRe: Convert to ASCII ? Pin
Vaclav_1-Aug-15 10:40
MemberVaclav_1-Aug-15 10:40 
GeneralRe: Convert to ASCII ? Pin
Richard MacCutchan1-Aug-15 22:00
communityengineerRichard MacCutchan1-Aug-15 22:00 
GeneralRe: Convert to ASCII ? Pin
CPallini2-Aug-15 7:56
mveCPallini2-Aug-15 7:56 
QuestionEfficient way of converting an 8bit array of grayscale pixel data into 24bpp bitmap for GDI+? Pin
Kiran Satish31-Jul-15 9:39
MemberKiran Satish31-Jul-15 9:39 
QuestionRe: Efficient way of converting an 8bit array of grayscale pixel data into 24bpp bitmap for GDI+? Pin
CPallini31-Jul-15 22:40
mveCPallini31-Jul-15 22:40 
AnswerRe: Efficient way of converting an 8bit array of grayscale pixel data into 24bpp bitmap for GDI+? Pin
Jochen Arndt31-Jul-15 22:51
professionalJochen Arndt31-Jul-15 22:51 
GeneralPassing an "array" in C Pin
PIEBALDconsult31-Jul-15 8:41
professionalPIEBALDconsult31-Jul-15 8:41 
GeneralRe: Passing an "array" in C Pin
k505431-Jul-15 8:55
Memberk505431-Jul-15 8:55 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult31-Jul-15 9:34
professionalPIEBALDconsult31-Jul-15 9:34 
SuggestionRe: Passing an "array" in C Pin
camycentsolutions2-Aug-15 20:36
Membercamycentsolutions2-Aug-15 20:36 
GeneralRe: Passing an "array" in C Pin
Chris Losinger31-Jul-15 10:50
professionalChris Losinger31-Jul-15 10:50 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult31-Jul-15 11:48
professionalPIEBALDconsult31-Jul-15 11:48 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult31-Jul-15 15:17
professionalPIEBALDconsult31-Jul-15 15:17 

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.