home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!bellahs!jjamison
- From: jjamison@bellahs.com (John Jamison RD AC)
- Subject: Re: Is Ctor X() required for the object of class X to be able to be dynamically allocated?
- Message-ID: <1992Nov19.191043.18010@bellahs.com>
- Summary: Yes
- Keywords: constructor X(), dynamic allocation
- Organization: Bell Atlantic Healthcare Systems
- References: <BxxC3p.Btn@math.uwaterloo.ca>
- Date: Thu, 19 Nov 1992 19:10:43 GMT
- Lines: 18
-
- In article <BxxC3p.Btn@math.uwaterloo.ca> xjzhu@math.uwaterloo.ca (Xiaojun Zhu) writes:
- >Q: Is it necessary to have a constructor which took no argument in order
- > for the object of a class to be able to be dynamically allocated?
- >
- >More specifically, I have a class X, when I can say
- >
- >X *x=new X[10] ?
- >
- >Is it required that class X have a constructor X()?
- >
- I can't cite chapter and verse, but such a constructor is required to
- create arrays of objects.
-
- --
- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
- John Jamison
- Bell Atlantic Healthcare Systems
-