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
trønderen8-Jun-24 5:05
trønderen8-Jun-24 5:05 
AnswerRe: C++, epiphanies, article content ideas Pin
jschell12-Jun-24 14:59
jschell12-Jun-24 14:59 
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 
I have one more question.
I will try my best to describe the issue and hoping the discussion does not get centered on terminology and RTFM as in the past.
That is not an instruction on how to reply, just a polite request to get real and skip opinions.

( And if you think me saying this is rude...
I am just trying to get of the dime and writing it as politely as I know)

I did have resolved the syntax of "passing the class" , however now I am stuck with WHERE the class should be declared.
In layman terms - the calling object passes a class pointer to the function, which happens to be my own created library. I expect the library function to PROCESS the passed class...
And that is where I am not sure if I have to define / declare the SAME class again - this time in the library.
I did test this using / passing SINGLE variable pointer and it worked OK.

I am not sure what to do when the entire class is passed.
I do not think dupicating the class definition is vise.

(Maybe it needs to be declared as global to the project ?)


Any theoretical help , answer, would be appreciated, I can manage the code...

Cheers







class BT_UTILITY_LIBRARY_EXPORT BT_Utility_Library
{
public:
    // class variable
    // forward declaration ? works here !
    class Test;

    //May31
    QString DEBUG_Process(void);
    QString DEBUG_Process(int *);
    QString DEBUG_Process(class Test *);
    QString DEBUG_Process_Class(class Test *);

    QString REG_EXP_Process(void);

    class Test
    {
       public:
       int a;
       //int b[a];
       QString text;
    }TestPointer;

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

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.