Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!uunet!mcsun!ukc!mucs!jk From: jk@cs.man.ac.uk (John Kewley ICL) Newsgroups: comp.lang.c++ Subject: Parentheses after new Message-ID: <1619@m1.cs.man.ac.uk> Date: 23 Aug 90 10:42:34 GMT Sender: news@cs.man.ac.uk Reply-To: jk@cs.man.ac.uk (John Kewley ICL) Distribution: comp Organization: Department of Computer Science, University of Manchester UK Lines: 24 The following fails to compile on both G++ and Sun C++. Could you tell me why the brackets around new's argument is illegal. I thought it would be a nice way of grouping the expression for a new statement (function?): class test { public: int eekeek; test(int eek) {eekeek= eek;} test() {eekeek= 4;} }; int main() { test* thattest= new (test); test* thistest= new (test(1)); return(0); } -- J.K. John M. Kewley, ICL, Wenlock Way, West Gorton, Manchester. M12 5DR Tel: (+44) 61 223 1301 X2138 Email: jk@r6.cs.man.ac.uk / jk@nw.stl.stc.co.uk