Path: utzoo!attcan!uunet!husc6!purdue!gatech!gt-eedsp!baud From: baud@gt-eedsp.UUCP (Kurt Baudendistel) Newsgroups: comp.lang.c++ Subject: initializiers for arrays of user defined types Keywords: c++, initializier, array Message-ID: <352@gt-eedsp.UUCP> Date: 22 Jul 88 16:35:06 GMT Distribution: na Organization: School of Electrical Engineering, Ga. Tech, Atlanta, GA 30332 Lines: 23 if i define a user defined type like complex, i can also define and use initializers for this type: double x = 1.; complex y(1.,1.); complex z = complex(x,x); also, i am automatically supplied with definitions for unary * (pointer indirection) and [] (array subscripting) and can make varialbe definitions of arrays for my user defined type: complex c[10]; but is there any way to combine initializers and array declarations for user defined types? i would like to use one of the following forms, but they don't work: complex c[2] = { complex(1.,1.), 5. }; double x[2] = { 1., 5. }, y[2] = { 1., 0. }; complex c[2](x,y); any ideas?