home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!spool.mu.edu!darwin.sura.net!gatech!taco!jlnance
- From: jlnance@eos.ncsu.edu (JAMES LEWIS NANCE)
- Subject: Newing a pointer to a pointer
- Message-ID: <1992Dec29.174843.20250@ncsu.edu>
- Originator: jlnance@chow2.ece.ncsu.edu
- Sender: news@ncsu.edu (USENET News System)
- Reply-To: jlnance@eos.ncsu.edu (JAMES LEWIS NANCE)
- Organization: North Carolina State University, Project Eos
- Date: Tue, 29 Dec 1992 17:48:43 GMT
- Lines: 23
-
-
- I am attempting to learn C++. I have declared a class called list and class
- called generic. In generic, lspace is declared as:
-
- list **lspace.
-
- Both g++ and cfront tell me that the line containing new in the following
- constructor has a syntax error.
-
- generic::generic() {
- this->lrow = 100;
- this->lcol = 100;
- this->lsize = 0;
- this->lspace = new *list[lcol];
- this->addrow();
- printf("Constructing element\n");
- }
-
- Can someone tell me what I am doing wrong?
-
- Thanks,
-
- Jim Nance
-