VanLUG Email Archive

VanLUG Mailing List
C++ question...

New Message Reply About this list Date view Thread view Subject view Author view

Alex Harford (alexh@dowco.com)
Fri, 24 Sep 1999 13:48:03 -0700 (PDT)


I've got a question for those of you who know some C++ and use the gnu
compiler. How does one create an array of a class, say Point, and
initialize them to something other than the default constructor?

For example:

Point vertex[20];

Would use the default constructor.

Point vertex(2,4)[20];

Doesn't work. Is there any other 1 line way I could do this?

----------------------------------------------------------------------
Alex Harford Alcohol and calculus don't mix.
http://www.dowco.com/~alexh Don't drink and derive.
alexh@dowco.com Tel: (604) 225-0601


New Message Reply About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b3 on Mon 15 Nov 1999 - 09:39:28