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

C / C++ / MFC

 
GeneralRe: Windows 7 UAC prevents my app to write log data Pin
sdancer7511-May-16 6:17
sdancer7511-May-16 6:17 
Question0xC000041D: An unhandled exception was encountered during a user callback. Pin
Austin Donaghy6-May-16 12:49
Austin Donaghy6-May-16 12:49 
AnswerRe: 0xC000041D: An unhandled exception was encountered during a user callback. Pin
Richard MacCutchan6-May-16 22:42
mveRichard MacCutchan6-May-16 22:42 
GeneralRe: 0xC000041D: An unhandled exception was encountered during a user callback. Pin
Austin Donaghy7-May-16 0:09
Austin Donaghy7-May-16 0:09 
AnswerRe: 0xC000041D: An unhandled exception was encountered during a user callback. Pin
Jochen Arndt6-May-16 23:01
professionalJochen Arndt6-May-16 23:01 
GeneralRe: 0xC000041D: An unhandled exception was encountered during a user callback. Pin
Austin Donaghy7-May-16 0:08
Austin Donaghy7-May-16 0:08 
AnswerRe: 0xC000041D: An unhandled exception was encountered during a user callback. Pin
Victor Nijegorodov7-May-16 20:48
Victor Nijegorodov7-May-16 20:48 
AnswerRe: 0xC000041D: An unhandled exception was encountered during a user callback. Pin
leon de boer8-May-16 3:36
leon de boer8-May-16 3:36 
99% of the time if you get a difference between release and debug mode you forgot to zero a variable and assume it is.

Turn the warning levels up to full and you should get a warning saying "use of uninitialized variable".

Usually it is something like this
int Bad (int someval){
	int i;
	if (someval > 0){
		i = 1;
	}
	if (i == 0) return (1);
	return (0);
}

In debug mode all local variables are zeroed automatically. That simply doesn't happen in release mode the variables will start at whatever rubbish was in the stack at the position it was allocated.

In the above code the behaviour of "bad" is totally predictable in debug mode as "i" will always start at 0. In release mode you have no idea what is going to happen as "i" could start at any value and the return is purely chance based.

Look carefully at the code, now try compiling it and tell me if you get a warning Smile | :)
In vino veritas


modified 8-May-16 9:48am.

Questionis there any good book about c++ class? Pin
hakan826-May-16 1:07
hakan826-May-16 1:07 
AnswerRe: is there any good book about c++ class? Pin
Richard MacCutchan6-May-16 2:57
mveRichard MacCutchan6-May-16 2:57 
AnswerRe: is there any good book about c++ class? Pin
CPallini9-May-16 21:31
mveCPallini9-May-16 21:31 
QuestionAny Instructions to Compile Wykobi library in C++Builder? Pin
Austin_Cpp5-May-16 12:57
Austin_Cpp5-May-16 12:57 
SuggestionRe: Any Instructions to Compile Wykobi library in C++Builder? Pin
Richard MacCutchan5-May-16 21:13
mveRichard MacCutchan5-May-16 21:13 
QuestionWindows Compatibility Mode Pin
Bram van Kampen4-May-16 15:59
Bram van Kampen4-May-16 15:59 
AnswerRe: Windows Compatibility Mode Pin
leon de boer4-May-16 22:49
leon de boer4-May-16 22:49 
GeneralRe: Windows Compatibility Mode Pin
Bram van Kampen5-May-16 12:24
Bram van Kampen5-May-16 12:24 
GeneralRe: Windows Compatibility Mode Pin
leon de boer5-May-16 18:50
leon de boer5-May-16 18:50 
GeneralRe: Windows Compatibility Mode Pin
Bram van Kampen6-May-16 16:33
Bram van Kampen6-May-16 16:33 
GeneralRe: Windows Compatibility Mode Pin
leon de boer8-May-16 3:26
leon de boer8-May-16 3:26 
AnswerRe: Windows Compatibility Mode Pin
Graham Breach4-May-16 22:13
Graham Breach4-May-16 22:13 
GeneralRe: Windows Compatibility Mode Pin
leon de boer5-May-16 1:44
leon de boer5-May-16 1:44 
GeneralRe: Windows Compatibility Mode Pin
Graham Breach5-May-16 3:04
Graham Breach5-May-16 3:04 
GeneralRe: Windows Compatibility Mode Pin
Bram van Kampen5-May-16 14:16
Bram van Kampen5-May-16 14:16 
GeneralRe: Windows Compatibility Mode Pin
David Crow6-May-16 3:28
David Crow6-May-16 3:28 
GeneralRe: Windows Compatibility Mode Pin
Bram van Kampen3-Jul-16 14:04
Bram van Kampen3-Jul-16 14:04 

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.