Click here to Skip to main content
15,905,144 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
CPallini19-Nov-08 23:52
mveCPallini19-Nov-08 23:52 
GeneralRe: Calling a function that accept a refrence to a variable when we don't have a reference to pass.. Pin
CPallini19-Nov-08 6:35
mveCPallini19-Nov-08 6:35 
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 
Well, when I saw PJ's reply I became unsure whether you actually have a variable but wasn't familiar with the concept of references, or you don't have an object at all.

The small novel in your reply to PJ is hard to understand. It would be easier to understand it if you showed the declarations of the functions.

However, my first reply still stands: either you're using the API the wrong way, or the API is poorly designed. It doesn't matter how obscure the description is of how you are going about it.

Are you sure the class with the private constructor is not implemented as a singleton? When I implement singletons I usually protect the constructors and have a static declared member function such as GetInstance() that would create the object if it hasn't been created earlier, but hand out a pointer to it if the object already exists.
If this is the case you could get hold of the one and only object there is to pass and as I understand your description that would solve your problem.


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

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.