Click here to Skip to main content
15,845,436 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHelp please Memoized rod cutting in C while showing the length it is cut Pin
Member 1279667016-Oct-16 13:03
Member 1279667016-Oct-16 13:03 
AnswerRe: Help please Memoized rod cutting in C while showing the length it is cut Pin
leon de boer16-Oct-16 17:12
leon de boer16-Oct-16 17:12 
GeneralRe: Help please Memoized rod cutting in C while showing the length it is cut Pin
Richard MacCutchan17-Oct-16 6:08
mveRichard MacCutchan17-Oct-16 6:08 
AnswerRe: Help please Memoized rod cutting in C while showing the length it is cut Pin
Richard MacCutchan16-Oct-16 22:25
mveRichard MacCutchan16-Oct-16 22:25 
QuestionAssigning pointers from one class to another and Pin
Vaclav_14-Oct-16 7:23
Vaclav_14-Oct-16 7:23 
AnswerRe: Assigning pointers from one class to another and Pin
leon de boer14-Oct-16 18:58
leon de boer14-Oct-16 18:58 
GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_15-Oct-16 3:24
Vaclav_15-Oct-16 3:24 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer15-Oct-16 5:42
leon de boer15-Oct-16 5:42 
No worries just remember classes always push a self pointer down to the call stack before any call to a function.
That is something a static function pointer can not do and why it needs special syntax.

If you just think of a class as a glorified C struct that can hold code as well as data and you will have an exact
understanding of what is happening. The code block in two instances of the class run exactly the same code the
only thing that changes is the code pulls back different self pointers which where pushed down to make the call.
So the same code on different class instances changes data in two different memory blocks because "self" changed.
In vino veritas

GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_15-Oct-16 7:12
Vaclav_15-Oct-16 7:12 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer15-Oct-16 18:16
leon de boer15-Oct-16 18:16 
GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_19-Oct-16 5:54
Vaclav_19-Oct-16 5:54 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer19-Oct-16 8:45
leon de boer19-Oct-16 8:45 
NewsHow to provide a Security to a proprietary software or presemtation. Pin
Member 1278313512-Oct-16 21:03
Member 1278313512-Oct-16 21:03 
GeneralRe: How to provide a Security to a proprietary software or presemtation. Pin
jeron113-Oct-16 5:15
jeron113-Oct-16 5:15 
GeneralRe: How to provide a Security to a proprietary software or presemtation. Pin
leon de boer13-Oct-16 9:17
leon de boer13-Oct-16 9:17 
Questionclass is missing "type" - why ? Pin
Vaclav_12-Oct-16 16:00
Vaclav_12-Oct-16 16:00 
AnswerRe: class is missing "type" - why ? PinPopular
leon de boer12-Oct-16 18:45
leon de boer12-Oct-16 18:45 
AnswerRe: class is missing "type" - why ? Pin
Graham Breach13-Oct-16 0:11
Graham Breach13-Oct-16 0:11 
QuestionObject Creation of an class? Pin
Mathan_CodeProject11-Oct-16 6:17
Mathan_CodeProject11-Oct-16 6:17 
AnsweralternatRe: Object Creation of an class? Pin
leon de boer11-Oct-16 6:50
leon de boer11-Oct-16 6:50 
GeneralRe: alternatRe: Object Creation of an class? Pin
Mathan_CodeProject12-Oct-16 0:02
Mathan_CodeProject12-Oct-16 0:02 
AnswerRe: Object Creation of an class? Pin
Krishnakumartg11-Oct-16 20:46
Krishnakumartg11-Oct-16 20:46 
GeneralRe: Object Creation of an class? Pin
Mathan_CodeProject12-Oct-16 0:01
Mathan_CodeProject12-Oct-16 0:01 
AnswerRe: Object Creation of an class? Pin
Midi_Mick11-Oct-16 23:13
professionalMidi_Mick11-Oct-16 23:13 
GeneralRe: Object Creation of an class? Pin
Mathan_CodeProject12-Oct-16 0:01
Mathan_CodeProject12-Oct-16 0:01 

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.