Click here to Skip to main content
15,905,073 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Roger Stoltz19-Nov-08 6:41
Roger Stoltz19-Nov-08 6:41 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
CPallini19-Nov-08 7:00
mveCPallini19-Nov-08 7:00 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Roger Stoltz19-Nov-08 7:10
Roger Stoltz19-Nov-08 7:10 
AnswerRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Roger Stoltz19-Nov-08 6:08
Roger Stoltz19-Nov-08 6:08 
QuestionRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Ahmed Charfeddine19-Nov-08 6:25
Ahmed Charfeddine19-Nov-08 6:25 
AnswerRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Roger Stoltz19-Nov-08 6:38
Roger Stoltz19-Nov-08 6:38 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Ahmed Charfeddine19-Nov-08 22:22
Ahmed Charfeddine19-Nov-08 22:22 
AnswerRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Roger Stoltz19-Nov-08 22:57
Roger Stoltz19-Nov-08 22:57 
hINTModuleState wrote:
note the solution i was given : it fools the compiler and it was just what i wanted


Mmmm, I saw the "solution" and I thought "this is exactly why it's been said about C++ that it's harder to shoot yourself in the foot than in C, but when you do it blows your whole leg off".

At the best, the API is poorly designed and this will actually work, which means that the programmer that designed the API didn't really know how to use references and their purpose.
At the worst, it seems to work, but it will crash later after you've distributed the application under obscure circumstances. Then you'll have an angry customer, or several, that requires an immediate fix and you have no idea of how to solve it.

Either way you will end up with a solution that you cannot really rely on and it will be "proven by use". Suspicious | :suss:

Best of luck! Rose | [Rose]


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Ahmed Charfeddine19-Nov-08 23:24
Ahmed Charfeddine19-Nov-08 23:24 
AnswerRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
sashoalm19-Nov-08 9:05
sashoalm19-Nov-08 9:05 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. [SOLVED] Pin
Ahmed Charfeddine19-Nov-08 21:50
Ahmed Charfeddine19-Nov-08 21:50 
AnswerRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Ahmed Charfeddine19-Nov-08 22:14
Ahmed Charfeddine19-Nov-08 22:14 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
CPallini19-Nov-08 23:10
mveCPallini19-Nov-08 23:10 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Ahmed Charfeddine19-Nov-08 23:30
Ahmed Charfeddine19-Nov-08 23:30 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. [modified] Pin
CPallini19-Nov-08 23:49
mveCPallini19-Nov-08 23:49 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
Ahmed Charfeddine24-Nov-08 2:21
Ahmed Charfeddine24-Nov-08 2:21 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
CPallini24-Nov-08 2:43
mveCPallini24-Nov-08 2:43 
QuestionButton control Pin
jimjim73319-Nov-08 5:33
jimjim73319-Nov-08 5:33 
AnswerRe: Button control Pin
PJ Arends19-Nov-08 6:12
professionalPJ Arends19-Nov-08 6:12 
AnswerRe: Button control Pin
Nishad S19-Nov-08 17:10
Nishad S19-Nov-08 17:10 
GeneralRe: Button control Pin
jimjim73319-Nov-08 23:45
jimjim73319-Nov-08 23:45 
QuestionVisual C++ 2003 Redistributables [Solved] Pin
bob1697219-Nov-08 5:12
bob1697219-Nov-08 5:12 
AnswerRe: Visual C++ 2003 Redistributables [Solved] Pin
bob1697219-Nov-08 5:29
bob1697219-Nov-08 5:29 
QuestionMFC and Vista General Question Pin
sabdalla8019-Nov-08 4:42
sabdalla8019-Nov-08 4:42 
AnswerRe: MFC and Vista General Question Pin
bob1697219-Nov-08 4:56
bob1697219-Nov-08 4:56 

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.