Click here to Skip to main content
15,902,903 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: raytracer Pin
bluatigro2-Oct-17 1:34
bluatigro2-Oct-17 1:34 
GeneralRe: raytracer Pin
leon de boer2-Oct-17 3:46
leon de boer2-Oct-17 3:46 
GeneralRe: raytracer Pin
leon de boer2-Oct-17 10:00
leon de boer2-Oct-17 10:00 
GeneralRe: raytracer Pin
bluatigro2-Oct-17 22:57
bluatigro2-Oct-17 22:57 
GeneralRe: raytracer Pin
leon de boer3-Oct-17 4:47
leon de boer3-Oct-17 4:47 
GeneralRe: raytracer Pin
bluatigro6-Oct-17 1:30
bluatigro6-Oct-17 1:30 
GeneralRe: raytracer Pin
bluatigro22-Oct-17 22:37
bluatigro22-Oct-17 22:37 
QuestionCPP Syntax Pin
Bram van Kampen28-Sep-17 11:17
Bram van Kampen28-Sep-17 11:17 
Hi,
I have a Class, which contains as member another class. This latter contained class has no default constructor, but requires a Parameter in it's constructor. How do I call this latter constructor in the constructor of the first class. This is a General CPP Question, but it is a bit abstract, so I give a Concrete example:

For instance:
I have a class derived from CDialog. It contains four instances of a custom class CDragBar. The CDragBar class in it's constructor determines whether it is horizontal or vertical. (one cannot have an indeterminate one) In this case I know ways around this conundrum,(e.g. Provide a default constructor for the CDragBar class, and provide methods like SetVertical() and SetHorizontal(), to be called in the 'CDialog derived classes constructor') but wonder is there a CPP syntax that could be used instead. The example I gave is in a way quite trivial. The Colon separated Constructor List only works for base class constructors of the main classes constructor in Microsoft Compilers, and not for contained member classes.

Anyone any ideas? Even if the idea is that no such syntax exists.

Kind Regards,
Bram van Kampen


modified 28-Sep-17 17:24pm.

AnswerRe: CPP Syntax Pin
CPallini28-Sep-17 22:16
mveCPallini28-Sep-17 22:16 
GeneralRe: CPP Syntax Pin
Bram van Kampen6-Oct-17 13:51
Bram van Kampen6-Oct-17 13:51 
QuestionComparing Files for Differences Pin
Member 1343302227-Sep-17 3:42
Member 1343302227-Sep-17 3:42 
AnswerRe: Comparing Files for Differences Pin
jeron127-Sep-17 4:09
jeron127-Sep-17 4:09 
QuestionRe: Comparing Files for Differences Pin
David Crow27-Sep-17 5:24
David Crow27-Sep-17 5:24 
AnswerRe: Comparing Files for Differences Pin
jschell27-Sep-17 9:23
jschell27-Sep-17 9:23 
GeneralRe: Comparing Files for Differences Pin
Member 1343302228-Sep-17 2:41
Member 1343302228-Sep-17 2:41 
GeneralRe: Comparing Files for Differences Pin
Jochen Arndt28-Sep-17 3:29
professionalJochen Arndt28-Sep-17 3:29 
GeneralMessage Closed Pin
29-Sep-17 4:00
Member 1343302229-Sep-17 4:00 
GeneralRe: Comparing Files for Differences Pin
jeron129-Sep-17 4:47
jeron129-Sep-17 4:47 
GeneralRe: Comparing Files for Differences Pin
Jochen Arndt29-Sep-17 4:58
professionalJochen Arndt29-Sep-17 4:58 
GeneralRe: Comparing Files for Differences Pin
jschell29-Sep-17 6:57
jschell29-Sep-17 6:57 
AnswerRe: Comparing Files for Differences Pin
Joe Woodbury29-Sep-17 13:04
professionalJoe Woodbury29-Sep-17 13:04 
AnswerRe: Comparing Files for Differences Pin
User 5838523-Oct-17 7:28
User 5838523-Oct-17 7:28 
Questionsend notification to srvice Pin
john563226-Sep-17 23:05
john563226-Sep-17 23:05 
AnswerRe: send notification to srvice Pin
CPallini26-Sep-17 23:25
mveCPallini26-Sep-17 23:25 
QuestionTo create drag and drop graphics builder Pin
manoharbalu25-Sep-17 21:05
manoharbalu25-Sep-17 21:05 

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.