Xref: news2.mv.net comp.lang.c++:100302 comp.os.msdos.djgpp:7038 From: cs3prj04 AT lion DOT cs DOT latrobe DOT edu DOT au (Cs3prj Group 04) Newsgroups: comp.lang.c++,comp.os.msdos.djgpp Subject: struct problem. Date: 10 Aug 1996 15:16:25 GMT Organization: Comp.Sci & Comp.Eng, La Trobe Uni, Australia Lines: 17 Distribution: world Message-ID: <4ui949$9kn@lion.cs.latrobe.edu.au> NNTP-Posting-Host: lion.cs.latrobe.edu.au To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I have a struct typedef defined called MenuBarItemS which contains no constructors or destructors. I want to use g++ but I do not want to use this struct as a class. I want to create an array of these structs as follows : Items=new MenuBarItemS[NumItems]; The problem is that the compiler thinks that my struct is a class and is creating a default copy constructor i.e. MenuBarItemS(MenuBarItemS &). When the compiler hits the above statement it is trying to call its default constructor for each array element but there are no arguments for it, hence it generates the error message 'Too few arguments in call to constructor .. . .' How can I get around this problem?