Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSTL find errors Pin
thelonesquirrely2-Jul-09 13:34
thelonesquirrely2-Jul-09 13:34 
AnswerRe: STL find errors Pin
«_Superman_»2-Jul-09 16:49
professional«_Superman_»2-Jul-09 16:49 
GeneralRe: STL find errors Pin
CPallini2-Jul-09 20:48
mveCPallini2-Jul-09 20:48 
GeneralRe: STL find errors Pin
«_Superman_»2-Jul-09 21:35
professional«_Superman_»2-Jul-09 21:35 
QuestionQuestion about some code that should crash but does not (release vs. debug & VS2003 vs. VS2008) Pin
Maximilien2-Jul-09 9:23
Maximilien2-Jul-09 9:23 
AnswerRe: Question about some code that should crash but does not (release vs. debug & VS2003 vs. VS2008) Pin
Stuart Dootson2-Jul-09 10:32
professionalStuart Dootson2-Jul-09 10:32 
GeneralRe: Question about some code that should crash but does not (release vs. debug & VS2003 vs. VS2008) Pin
Maximilien2-Jul-09 12:57
Maximilien2-Jul-09 12:57 
AnswerRe: Question about some code that should crash but does not (release vs. debug & VS2003 vs. VS2008) Pin
Christopher W. Smith2-Jul-09 20:39
Christopher W. Smith2-Jul-09 20:39 
I think you are assuming that a struct in C++ works the same way as a struct in plain old C, but alas it doesn't... well not really anyway.

When you introduce non-primitive data types into structs in C++ they cease to be simple "data structures" and become basically the same as classes only their members default to public instead of private.

My guess is when you try to overwrite the object you are writing over the beginning of its virtual table which probably contains extra debug information in debug mode. In release mode you are then probably overwriting more important class data.

Remember, the sizeof operator is not designed to get the size of an object or its virtual table.

http://en.wikipedia.org/wiki/Virtual_method_table[^]

Chris Smith

GeneralRe: Question about some code that should crash but does not (release vs. debug & VS2003 vs. VS2008) Pin
Maximilien3-Jul-09 1:04
Maximilien3-Jul-09 1:04 
Questionhow can i get file names dynamically? Pin
santhosh-padamatinti2-Jul-09 8:50
santhosh-padamatinti2-Jul-09 8:50 
QuestionRe: how can i get file names dynamically? Pin
Rajesh R Subramanian2-Jul-09 9:24
professionalRajesh R Subramanian2-Jul-09 9:24 
AnswerRe: how can i get file names dynamically? Pin
Stuart Dootson2-Jul-09 9:32
professionalStuart Dootson2-Jul-09 9:32 
AnswerRe: how can i get file names dynamically? Pin
Madhu Nair2-Jul-09 18:27
Madhu Nair2-Jul-09 18:27 
GeneralRe: how can i get file names dynamically? Pin
Stuart Dootson2-Jul-09 20:34
professionalStuart Dootson2-Jul-09 20:34 
JokeRe: how can i get file names dynamically? Pin
Rajesh R Subramanian2-Jul-09 22:00
professionalRajesh R Subramanian2-Jul-09 22:00 
JokeRe: how can i get file names dynamically? Pin
Stuart Dootson2-Jul-09 22:07
professionalStuart Dootson2-Jul-09 22:07 
GeneralRe: how can i get file names dynamically? Pin
Rajesh R Subramanian2-Jul-09 22:09
professionalRajesh R Subramanian2-Jul-09 22:09 
GeneralRe: how can i get file names dynamically? Pin
Stuart Dootson2-Jul-09 22:09
professionalStuart Dootson2-Jul-09 22:09 
QuestionRe: how can i get file names dynamically? Pin
David Crow2-Jul-09 9:34
David Crow2-Jul-09 9:34 
Questiondisable MFC dialog based Microsoft Web Browser showing context menu [modified] Pin
JACyo2-Jul-09 6:39
JACyo2-Jul-09 6:39 
AnswerRe: disable MFC dialog based Microsoft Web Browser showing context menu Pin
Stuart Dootson2-Jul-09 9:30
professionalStuart Dootson2-Jul-09 9:30 
GeneralRe: disable MFC dialog based Microsoft Web Browser showing context menu Pin
JACyo2-Jul-09 15:45
JACyo2-Jul-09 15:45 
GeneralRe: disable MFC dialog based Microsoft Web Browser showing context menu Pin
Stuart Dootson2-Jul-09 20:33
professionalStuart Dootson2-Jul-09 20:33 
Questionconvert vbscript to c++ Pin
Mogaambo2-Jul-09 6:26
Mogaambo2-Jul-09 6:26 
QuestionRe: convert vbscript to c++ Pin
led mike2-Jul-09 7:41
led mike2-Jul-09 7:41 

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.