Click here to Skip to main content
15,879,095 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: [OOP c++] practical use cases of cross casting REPOST Pin
Richard MacCutchan7-Nov-11 23:27
mveRichard MacCutchan7-Nov-11 23:27 
GeneralRe: [OOP c++] practical use cases of cross casting REPOST Pin
elgaabeb7-Nov-11 23:35
elgaabeb7-Nov-11 23:35 
Questionmaking a unsigned char array gives a buffer overrun error Pin
VCProgrammer6-Nov-11 17:45
VCProgrammer6-Nov-11 17:45 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole6-Nov-11 18:13
Chuck O'Toole6-Nov-11 18:13 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Luc Pattyn6-Nov-11 23:04
sitebuilderLuc Pattyn6-Nov-11 23:04 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 6:57
Erudite_Eric7-Nov-11 6:57 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 7:18
professionalAlbert Holguin7-Nov-11 7:18 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 6:56
Erudite_Eric7-Nov-11 6:56 
Look, here is a tip. Stack corruption is a pig to debug:

NEVER ALLOCATE AN ARRAY ON THE STACK.

That is rule one of writing good code. All arrays go on the heap. Period.

THen when you run your app use Appverifier. Its afree download. If you blow a heap buffer it will barf and tell you why.

If you blow a stack bufer you aint got nowt but a mess dude. DONT DO IT! ALL ARRAYS GO ON THE HEAP!

Smile | :)
==============================

Nothing to say.

GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 7:17
professionalAlbert Holguin7-Nov-11 7:17 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole7-Nov-11 7:22
Chuck O'Toole7-Nov-11 7:22 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 7:23
professionalAlbert Holguin7-Nov-11 7:23 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 7:41
Erudite_Eric7-Nov-11 7:41 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 7:45
professionalAlbert Holguin7-Nov-11 7:45 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 8:05
Erudite_Eric7-Nov-11 8:05 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 8:24
professionalAlbert Holguin7-Nov-11 8:24 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 20:57
Erudite_Eric7-Nov-11 20:57 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole8-Nov-11 2:04
Chuck O'Toole8-Nov-11 2:04 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric8-Nov-11 22:02
Erudite_Eric8-Nov-11 22:02 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin9-Nov-11 4:03
professionalAlbert Holguin9-Nov-11 4:03 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole9-Nov-11 4:16
Chuck O'Toole9-Nov-11 4:16 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric9-Nov-11 22:50
Erudite_Eric9-Nov-11 22:50 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin10-Nov-11 11:51
professionalAlbert Holguin10-Nov-11 11:51 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric9-Nov-11 22:50
Erudite_Eric9-Nov-11 22:50 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole9-Nov-11 4:15
Chuck O'Toole9-Nov-11 4:15 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric9-Nov-11 22:54
Erudite_Eric9-Nov-11 22:54 

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.