Click here to Skip to main content
15,888,521 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How explicit , volatile and mutable keywords works INTERNALLY in C++ ? Pin
Richard MacCutchan7-Nov-16 0:18
mveRichard MacCutchan7-Nov-16 0:18 
AnswerRe: How explicit , volatile and mutable keywords works INTERNALLY in C++ ? Pin
leon de boer7-Nov-16 8:15
leon de boer7-Nov-16 8:15 
GeneralPlease help Pin
Ahmed Adel5-Nov-16 3:20
Ahmed Adel5-Nov-16 3:20 
GeneralRe: Please help Pin
Richard MacCutchan5-Nov-16 21:01
mveRichard MacCutchan5-Nov-16 21:01 
GeneralRe: Please help Pin
leon de boer6-Nov-16 4:49
leon de boer6-Nov-16 4:49 
PraiseRe: Please help Pin
Ahmed Adel6-Nov-16 5:10
Ahmed Adel6-Nov-16 5:10 
QuestionPattern review C++: using structs with pure virtual methods in place of interfaces Pin
Member 128328324-Nov-16 5:58
Member 128328324-Nov-16 5:58 
AnswerRe: Pattern review C++: using structs with pure virtual methods in place of interfaces Pin
Chris Losinger4-Nov-16 8:23
professionalChris Losinger4-Nov-16 8:23 
1. it's legal for a class to inherit from a struct, but it's unusual (i've never seen it done).

in my experience, structs are generally used in C++, like you said, for smaller objects - if they're used at all.

using a class for the interface is standard. having to type "public" isn't that big of a deal, and it avoids someone having to Google "can a class inherit from a struct".

2. your method is fine. personally, i would give the implementation it's own .h file.

FYI, what you're doing here is known as "PIMPL" in C++. there's a lot of info on it out there.

AnswerRe: Pattern review C++: using structs with pure virtual methods in place of interfaces Pin
leon de boer4-Nov-16 8:48
leon de boer4-Nov-16 8:48 
AnswerRe: Pattern review C++: using structs with pure virtual methods in place of interfaces Pin
«_Superman_»5-Nov-16 21:42
professional«_Superman_»5-Nov-16 21:42 
AnswerRe: Pattern review C++: using structs with pure virtual methods in place of interfaces Pin
Daniel Pfeffer6-Nov-16 0:35
professionalDaniel Pfeffer6-Nov-16 0:35 
QuestionMouse out of dialog Pin
_Flaviu3-Nov-16 4:07
_Flaviu3-Nov-16 4:07 
AnswerRe: Mouse out of dialog Pin
leon de boer3-Nov-16 4:21
leon de boer3-Nov-16 4:21 
QuestionRe: Mouse out of dialog Pin
David Crow3-Nov-16 15:42
David Crow3-Nov-16 15:42 
AnswerRe: Mouse out of dialog Pin
_Flaviu3-Nov-16 21:44
_Flaviu3-Nov-16 21:44 
GeneralRe: Mouse out of dialog Pin
Richard MacCutchan3-Nov-16 22:04
mveRichard MacCutchan3-Nov-16 22:04 
GeneralRe: Mouse out of dialog Pin
leon de boer3-Nov-16 22:10
leon de boer3-Nov-16 22:10 
GeneralRe: Mouse out of dialog Pin
_Flaviu3-Nov-16 23:12
_Flaviu3-Nov-16 23:12 
QuestionSharing some humour Pin
leon de boer2-Nov-16 5:40
leon de boer2-Nov-16 5:40 
JokeRe: Sharing some humour Pin
Randor 2-Nov-16 17:34
professional Randor 2-Nov-16 17:34 
GeneralRe: Sharing some humour Pin
leon de boer2-Nov-16 18:57
leon de boer2-Nov-16 18:57 
AnswerRe: Sharing some humour Pin
Daniel Pfeffer2-Nov-16 22:23
professionalDaniel Pfeffer2-Nov-16 22:23 
GeneralRe: Sharing some humour Pin
leon de boer3-Nov-16 3:14
leon de boer3-Nov-16 3:14 
GeneralRe: Sharing some humour Pin
Daniel Pfeffer3-Nov-16 3:34
professionalDaniel Pfeffer3-Nov-16 3:34 
GeneralRe: Sharing some humour Pin
leon de boer3-Nov-16 4:41
leon de boer3-Nov-16 4:41 

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.