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

C / C++ / MFC

 
QuestionGetPrivateProfileString() problem Pin
ashish8patil2-Jul-09 20:22
ashish8patil2-Jul-09 20:22 
AnswerRe: GetPrivateProfileString() problem Pin
«_Superman_»2-Jul-09 20:34
professional«_Superman_»2-Jul-09 20:34 
GeneralRe: GetPrivateProfileString() problem Pin
ashish8patil2-Jul-09 21:31
ashish8patil2-Jul-09 21:31 
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 
Howdy'

I have some very bad code that should crash but I'm having difficulty figuring out why it does not crash (or even give out warnings); it works in VS2003 in release&debug and in VS2008 in debug, not in release.

class Info
{
public:
	Info();
	Info(std::wstring s1, std::wstring s2);// : m_string1(_T("")),m_string2(_T("")){};
	std::wstring m_string2;
};
struct myStruct
{
	std::vector <Info*> m_JobInfoVector;
};


m_MyStruct = (myStruct*)malloc(sizeof (myStruct) );
ZeroMemory(m_MyStruct, sizeof(myStruct));
Info* p = new Info( std::wstring(_T("allo"))  );
m_MyStruct->m_JobInfoVector.clear();


Question : What happens to the vector member when the ZeroMemory is called ? and why it does not crash in debug but it does in release ?
Confused | :confused:

Thanks.
Max.

This signature was proudly tested on animals.

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 
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 

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.