Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Object Creation of an class? Pin
Mathan_CodeProject11-Oct-16 23:01
Mathan_CodeProject11-Oct-16 23:01 
QuestionC++ syntax Pin
Ratul Thakur10-Oct-16 21:35
Ratul Thakur10-Oct-16 21:35 
AnswerRe: C++ syntax Pin
CPallini10-Oct-16 21:49
mveCPallini10-Oct-16 21:49 
AnswerRe: C++ syntax Pin
Richard MacCutchan10-Oct-16 21:50
mveRichard MacCutchan10-Oct-16 21:50 
AnswerRe: C++ syntax Pin
David Crow11-Oct-16 6:20
David Crow11-Oct-16 6:20 
QuestionOne more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_9-Oct-16 6:18
Vaclav_9-Oct-16 6:18 
AnswerRe: One more error using function pointers - void value not ignored as it ought to be Pin
Richard MacCutchan9-Oct-16 6:36
mveRichard MacCutchan9-Oct-16 6:36 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_9-Oct-16 7:53
Vaclav_9-Oct-16 7:53 
Richard,
setting the class function to static breaks calls from class A to class D , no biggie.
I need to fix this pointer first.

Adding class name to the funtion I wnat to point too got me this error:
cannot convert 'INHERITANCE_A::Process_INHERITANCE_A' from type 'void (INHERITANCE_A:Smile | :) ()' to type 'void (*)()'

Removing the function parameter - char* - created this error . I interpter iot as missing char.

// bool (*FunctionPointer_A)(void);
FunctionPointer_B = &INHERITANCE_A::Process_INHERITANCE_A; // (Text);

ketch/Inheritance_A.h: In static member function 'static bool INHERITANCE_A::TestFunctionPointer(char*)':
Inheritance_A.h:27: error: invalid conversion from 'void (*)(char*)' to 'void (*)()' [-fpermissive]
FunctionPointer_B = &INHERITANCE_A::Process_INHERITANCE_A; // (Text);
^
This is getting frustrating , but still this is only a test.

I am hoping to be able to have access from one class in inheritance chain to another member of the inheritance chain.
I do not like this dependencies / calls between the classes in the inheritance chain , but I kinda of inherited that. No pun intended.
I got it working going down the chain, now I need to go up the chain and hoping class pointers will work.
Sorry for this mess.
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer9-Oct-16 23:11
leon de boer9-Oct-16 23:11 
AnswerRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer9-Oct-16 21:42
leon de boer9-Oct-16 21:42 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Richard MacCutchan9-Oct-16 21:49
mveRichard MacCutchan9-Oct-16 21:49 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer9-Oct-16 23:23
leon de boer9-Oct-16 23:23 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Richard MacCutchan9-Oct-16 23:25
mveRichard MacCutchan9-Oct-16 23:25 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_10-Oct-16 4:17
Vaclav_10-Oct-16 4:17 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer10-Oct-16 4:32
leon de boer10-Oct-16 4:32 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_10-Oct-16 13:20
Vaclav_10-Oct-16 13:20 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer10-Oct-16 17:02
leon de boer10-Oct-16 17:02 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_11-Oct-16 7:01
Vaclav_11-Oct-16 7:01 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer11-Oct-16 17:26
leon de boer11-Oct-16 17:26 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_12-Oct-16 14:42
Vaclav_12-Oct-16 14:42 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer12-Oct-16 17:09
leon de boer12-Oct-16 17:09 
QuestionMore basic C++ questions - may I ask? Pin
Vaclav_8-Oct-16 15:24
Vaclav_8-Oct-16 15:24 
AnswerRe: More basic C++ questions - may I ask? Pin
Midi_Mick8-Oct-16 15:52
professionalMidi_Mick8-Oct-16 15:52 
AnswerRe: More basic C++ questions - may I ask? Pin
Richard MacCutchan8-Oct-16 20:37
mveRichard MacCutchan8-Oct-16 20:37 
GeneralRe: More basic C++ questions - may I ask? Pin
Vaclav_9-Oct-16 6:20
Vaclav_9-Oct-16 6:20 

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.