Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!kodak!uupsi!phage!monardo From: monardo@cshl.org (Pat Monardo) Newsgroups: comp.lang.c++ Subject: structures with variable length elements. Message-ID: <1991May18.010928.16619@cshl.org> Date: 18 May 91 01:09:28 GMT Sender: news@cshl.org (NO MAIL) Organization: Cold Spring Harbor Laboratory Lines: 25 i am only superficially aware of C++, so.... i recall that PL1 would allow a structure to contain variable length elements (depending on a length parameter). With C i would have to declare a pointer and allocate the memory. Did PL1 allocate the vector inline? Does C++ do this? Maybe a little visual aid would clarify: C: struct { int vector_len; int *vector_val; }; C++:? struct { int vector_len; int vector_val[0]; ... int vector_val[vector_len-1]; ... };