Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uwm.edu!uwvax!persoft!eda From: eda@persoft.com (Ed Almasy) Newsgroups: comp.lang.c++ Subject: Initializing a Member That is a Class Summary: Where do constructor args come from for a member that is a class? Message-ID: <1991Jan31.194631.3447@persoft.com> Date: 31 Jan 91 19:46:31 GMT Distribution: na Organization: Persoft, Inc. Lines: 16 This has been puzzling me for some time, and I'm hoping that someone here can explain it. Assuming: A is a class, with a constructor that requires 3 arguments B is a class, containing a member of type A C is a struct, containing a member of type A My question is: When I create data items of type B or C, where do the constructor arguments for the member that is of type A come from? Do I have to put them in my declaration for B or C, or is there a way to specify them at run time? If so, what is the proper syntax? Up until now I've just avoided this situation by coding around it, but it's about time for me to stop weaseling around the issue and code these things the way they should be. :-) Thanks!