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

C / C++ / MFC

 
GeneralRe: How do I access private variable of an object ? Pin
Richard MacCutchan17-Jun-21 0:35
mveRichard MacCutchan17-Jun-21 0:35 
GeneralRe: How do I access private variable of an object ? Pin
CPallini17-Jun-21 1:32
mveCPallini17-Jun-21 1:32 
GeneralMessage Closed Pin
17-Jun-21 6:36
Member 1496877117-Jun-21 6:36 
GeneralRe: How do I access private variable of an object ? Pin
Richard MacCutchan17-Jun-21 6:40
mveRichard MacCutchan17-Jun-21 6:40 
GeneralRe: How do I access private variable of an object ? Pin
CPallini17-Jun-21 7:43
mveCPallini17-Jun-21 7:43 
AnswerRe: How do I access private variable of an object ? Pin
Magnus Forslund15-Jul-21 2:19
Magnus Forslund15-Jul-21 2:19 
QuestionMessage Closed Pin
15-Jun-21 10:35
Member 1496877115-Jun-21 10:35 
AnswerRe: Pass a function with parameter Pin
Greg Utas15-Jun-21 11:38
professionalGreg Utas15-Jun-21 11:38 
This looks suspicious to me:
C++
&MainWindow::Run_DDD_OPTION(testWidget)

It looks like you're trying to create a pointer to whatever Run_DDD_OPTION returns. However, you also say
Run_DDD_OPTION(testWidget); // runs fine
which either means that it returns void or you didn't care what it returned. My guess is the former, which would explain all the error messages. If it returns void, you can't take its address, and there is no lvalue (=a memory address).

EDIT: If you want to pass the function Run_DDD_OPTION as an argument to addAction, just write
C++
addAction(tr("&Device Discovery Dialog(modified Bluetooth scanner)"),
   this,
   MainWindow::Run_DDD_OPTION
   );
You may need the & in front of the function name--I haven't done this in a long time, so I have to look it up. --It looks like it's optional. If it doesn't work without it, try it with it.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.


modified 15-Jun-21 17:48pm.

GeneralMessage Closed Pin
15-Jun-21 13:30
Member 1496877115-Jun-21 13:30 
GeneralRe: Pass a function with parameter Pin
Greg Utas15-Jun-21 13:39
professionalGreg Utas15-Jun-21 13:39 
GeneralMessage Closed Pin
15-Jun-21 15:23
Member 1496877115-Jun-21 15:23 
GeneralRe: Pass a function with parameter Pin
Greg Utas16-Jun-21 0:22
professionalGreg Utas16-Jun-21 0:22 
QuestionRegarding Constructor Calling in C++ Pin
Member 1522917415-Jun-21 3:08
Member 1522917415-Jun-21 3:08 
AnswerRe: Regarding Constructor Calling in C++ Pin
David Crow15-Jun-21 3:29
David Crow15-Jun-21 3:29 
GeneralRe: Regarding Constructor Calling in C++ Pin
Member 1522917415-Jun-21 3:55
Member 1522917415-Jun-21 3:55 
GeneralRe: Regarding Constructor Calling in C++ Pin
Richard MacCutchan15-Jun-21 5:02
mveRichard MacCutchan15-Jun-21 5:02 
AnswerRe: Regarding Constructor Calling in C++ Pin
Maximilien15-Jun-21 5:01
Maximilien15-Jun-21 5:01 
AnswerRe: Regarding Constructor Calling in C++ Pin
CPallini15-Jun-21 23:39
mveCPallini15-Jun-21 23:39 
QuestionAdvice on writing a GUI application that can run on very old Windows operating systems without Service Packs and Frameworks Pin
arnold_w14-Jun-21 8:32
arnold_w14-Jun-21 8:32 
AnswerRe: Advice on writing a GUI application that can run on very old Windows operating systems without Service Packs and Frameworks Pin
Victor Nijegorodov14-Jun-21 8:43
Victor Nijegorodov14-Jun-21 8:43 
AnswerRe: Advice on writing a GUI application that can run on very old Windows operating systems without Service Packs and Frameworks Pin
Mircea Neacsu14-Jun-21 8:45
Mircea Neacsu14-Jun-21 8:45 
AnswerRe: Advice on writing a GUI application that can run on very old Windows operating systems without Service Packs and Frameworks Pin
Richard MacCutchan14-Jun-21 8:51
mveRichard MacCutchan14-Jun-21 8:51 
AnswerRe: Advice on writing a GUI application that can run on very old Windows operating systems without Service Packs and Frameworks Pin
Eddy Vluggen14-Jun-21 9:18
professionalEddy Vluggen14-Jun-21 9:18 
AnswerRe: Advice on writing a GUI application that can run on very old Windows operating systems without Service Packs and Frameworks Pin
Maximilien15-Jun-21 5:22
Maximilien15-Jun-21 5:22 
QuestionWindows 10 - find last logon time in C++ ?? Pin
Derell Licht5-Jun-21 16:28
professionalDerell Licht5-Jun-21 16:28 

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.