Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Prevent active controls under child window to overwhelm it Pin
428812-Apr-08 10:47
428812-Apr-08 10:47 
GeneralRe: Prevent active controls under child window to overwhelm it Pin
Moak12-Apr-08 16:30
Moak12-Apr-08 16:30 
GeneralRe: Prevent active controls under child window to overwhelm it Pin
428813-Apr-08 10:48
428813-Apr-08 10:48 
GeneralRe: Prevent active controls under child window to overwhelm it Pin
Moak13-Apr-08 13:22
Moak13-Apr-08 13:22 
GeneralRe: Prevent active controls under child window to overwhelm it Pin
428814-Apr-08 0:46
428814-Apr-08 0:46 
JokeRe: Prevent active controls under child window to overwhelm it Pin
Moak14-Apr-08 11:58
Moak14-Apr-08 11:58 
GeneralRe: Prevent active controls under child window to overwhelm it Pin
Mark Salsbery14-Apr-08 14:15
Mark Salsbery14-Apr-08 14:15 
GeneralRe: Prevent active controls under child window to overwhelm it Pin
Moak14-Apr-08 14:29
Moak14-Apr-08 14:29 
Questionremoving the maximize box Pin
genush11-Apr-08 6:17
genush11-Apr-08 6:17 
GeneralRe: removing the maximize box Pin
Gavin Taylor11-Apr-08 6:40
professionalGavin Taylor11-Apr-08 6:40 
QuestionRe: removing the maximize box Pin
genush11-Apr-08 8:00
genush11-Apr-08 8:00 
GeneralRe: removing the maximize box Pin
Randor 11-Apr-08 8:42
professional Randor 11-Apr-08 8:42 
GeneralMFC project with fortran modules in it, gets linker errors Pin
ns11-Apr-08 5:52
ns11-Apr-08 5:52 
GeneralRe: MFC project with fortran modules in it, gets linker errors Pin
rp_suman11-Apr-08 6:02
rp_suman11-Apr-08 6:02 
GeneralRe: MFC project with fortran modules in it, gets linker errors Pin
ns11-Apr-08 7:41
ns11-Apr-08 7:41 
GeneralPassing by reference vs. Value Pin
LCI11-Apr-08 4:20
LCI11-Apr-08 4:20 
GeneralRe: Passing by reference vs. Value Pin
led mike11-Apr-08 4:28
led mike11-Apr-08 4:28 
GeneralRe: Passing by reference vs. Value Pin
LCI11-Apr-08 4:40
LCI11-Apr-08 4:40 
GeneralRe: Passing by reference vs. Value Pin
CPallini11-Apr-08 4:46
mveCPallini11-Apr-08 4:46 
GeneralRe: Passing by reference vs. Value Pin
Cedric Moonen11-Apr-08 4:47
Cedric Moonen11-Apr-08 4:47 
GeneralRe: Passing by reference vs. Value Pin
led mike11-Apr-08 6:14
led mike11-Apr-08 6:14 
GeneralRe: Passing by reference vs. Value Pin
CPallini11-Apr-08 4:32
mveCPallini11-Apr-08 4:32 
AnswerRe: Passing by reference vs. Value Pin
Bram van Kampen11-Apr-08 12:21
Bram van Kampen11-Apr-08 12:21 
Hi
There is much confusion, in particular amongst novices, about Pointers, References snd Values when used as arguments.

Using a Value is clear, a copy of the value gets placed on the stack. You can do what you want with it, it will be lost when the stack is cut down when you return from the procedure.

A pointer is also clear, You're passing on the address of some data. That data resides elsewhere, but you're given the access to the original. so Changing the data through the pointer affects the original.

The problem here is that the Pointer may not point at valid memory. This is a condition that can only be checked at runtime. There is no way the compiler can use to check the validity of a pointer at Compile Time.

When you use a Reference, you will get passed the address of the variable to your procedure, and the generated code is identical to passing a pointer. The difference is, that unlike passing pointers, the language syntax and semantics force you to enter the correct variable name.

Hope this helps. Smile | :)

Bram van Kampen

GeneralCompiling a Parser Generator generated file causes linker errors Pin
Manfr3d11-Apr-08 4:11
Manfr3d11-Apr-08 4:11 
GeneralRe: Compiling a Parser Generator generated file causes linker errors Pin
rp_suman11-Apr-08 4:40
rp_suman11-Apr-08 4:40 

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.