Click here to Skip to main content
15,942,847 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++, epiphanies, article content ideas Pin
honey the codewitch12-Jun-24 15:03
mvahoney the codewitch12-Jun-24 15:03 
GeneralRe: C++, epiphanies, article content ideas Pin
jschell13-Jun-24 12:33
jschell13-Jun-24 12:33 
GeneralRe: C++, epiphanies, article content ideas Pin
honey the codewitch13-Jun-24 12:37
mvahoney the codewitch13-Jun-24 12:37 
GeneralRe: C++, epiphanies, article content ideas Pin
jschell14-Jun-24 13:15
jschell14-Jun-24 13:15 
PraiseI never fail to be impressed by this Pin
honey the codewitch7-Jun-24 5:44
mvahoney the codewitch7-Jun-24 5:44 
QuestionPassing a class (pointer) to library - Linux Pin
Salvatore Terress31-May-24 9:00
Salvatore Terress31-May-24 9:00 
AnswerRe: Passing a class (pointer) to library - Linux Pin
k505431-May-24 10:25
mvek505431-May-24 10:25 
GeneralBUMP Re: Passing a class (pointer) to library - Linux Pin
Salvatore Terress31-May-24 14:12
Salvatore Terress31-May-24 14:12 
Could somebody please help me with solving this?

note: passing argument
to parameter 'Agrument' here
QString DEBUG_Process_Class(class REG_EXP_Class *Agrument );


I just cannot find any RTFM to "passing class pointer" to function ,
and I have no issues passing int * to a function.


Thanks for the reply.
I am not sure HOW to change to the "abstract class".

I have been struggling with Qt implementation of anything related to inheritance.

Anyway,
I did implemented the "supporting " class as a global variable.
I have not done "globals" for years and it was an OF memory exercise...


C++
// initilize class
pREG_EXP_Class = new REG_EXP_Class;
pREG_EXP_Class->a = 10;
pREG_EXP_Class->text = "test text ";
// test run
pBTUL->DEBUG_Process_Class(pREG_EXP_Class);
// declaration
//  QString DEBUG_Process_Class(class REG_EXP_Class *Argument );


All is working , until I did try to actually pass the class pointer...

Then I get this error and have no ideas where is my coding error.

/mnt/A_BT_DEC10/A_MAY_9_MAY31_CLEAN_BACKUP/A_APR9_MAR7_MAR19_CLEAN/A_BT_LIBRARY/A_DEC17_Bluetoothctl_Dialog_V1/mainwindow_bluewtoothctl_dialog.cpp:8911:

error: cannot initialize a parameter of type 'class REG_EXP_Class *' with an lvalue of type 'REG_EXP_Class *'

mainwindow_bluewtoothctl_dialog.cpp:8911:28: error: cannot initialize a parameter of type 'class REG_EXP_Class *' with an lvalue of type 'REG_EXP_Class *'


pBTUL->DEBUG_Process_Class(pREG_EXP_Class);

                           ^~~~~~~~~~~~~~
../A_DEC17_BT_Utility_Library/bt_utility_library.h:59:54: note: passing argument 
to parameter 'Agrument' here
    QString DEBUG_Process_Class(class REG_EXP_Class *Agrument );
                                                     ^


I could use some advise how to correctly pass the class pointer, this
"try this ... try that" is tedious.

and before I get " get a book..." I have no idea under what subject to look for...
" passing paramater to argument " ???

modified 3-Jun-24 10:29am.

GeneralRe: Passing a class (pointer) to library - Linux Pin
Richard MacCutchan1-Jun-24 1:47
mveRichard MacCutchan1-Jun-24 1:47 
GeneralRe: BUMP Re: Passing a class (pointer) to library - Linux Pin
Richard MacCutchan4-Jun-24 2:02
mveRichard MacCutchan4-Jun-24 2:02 
QuestionHow C++ manage memory in event driven system ? Pin
Salvatore Terress30-May-24 4:44
Salvatore Terress30-May-24 4:44 
AnswerRe: How C++ manage memory in event driven system ? Pin
Richard MacCutchan30-May-24 5:47
mveRichard MacCutchan30-May-24 5:47 
AnswerRe: How C++ manage memory in event driven system ? Pin
k505430-May-24 5:58
mvek505430-May-24 5:58 
GeneralRe: How C++ manage memory in event driven system ? Pin
Salvatore Terress30-May-24 7:09
Salvatore Terress30-May-24 7:09 
GeneralRe: How C++ manage memory in event driven system ? Pin
Richard MacCutchan30-May-24 9:09
mveRichard MacCutchan30-May-24 9:09 
GeneralRe: How C++ manage memory in event driven system ? Pin
k505430-May-24 9:47
mvek505430-May-24 9:47 
GeneralRe: How C++ manage memory in event driven system ? Pin
Salvatore Terress30-May-24 12:54
Salvatore Terress30-May-24 12:54 
QuestionUPDATE CLOSED error: declaration of anonymous class must be a definition Pin
Salvatore Terress25-May-24 5:49
Salvatore Terress25-May-24 5:49 
AnswerRe: error: declaration of anonymous class must be a definition Pin
k505425-May-24 6:25
mvek505425-May-24 6:25 
GeneralRe: error: declaration of anonymous class must be a definition Pin
Salvatore Terress25-May-24 8:26
Salvatore Terress25-May-24 8:26 
GeneralRe: error: declaration of anonymous class must be a definition Pin
Richard MacCutchan25-May-24 21:21
mveRichard MacCutchan25-May-24 21:21 
GeneralRe: error: declaration of anonymous class must be a definition Pin
k505427-May-24 5:26
mvek505427-May-24 5:26 
AnswerRe: error: declaration of anonymous class must be a definition Pin
RedDk26-May-24 9:42
RedDk26-May-24 9:42 
GeneralRe: error: declaration of anonymous class must be a definition Pin
Salvatore Terress28-May-24 3:52
Salvatore Terress28-May-24 3:52 
QuestionUPDATE REPOST BUMP How to construct / build / interpret regular expression ? Pin
Salvatore Terress24-May-24 6:31
Salvatore Terress24-May-24 6:31 

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.