Scott McMillan (scott++at++ht.com)
Wed, 2 Jul 1997 10:12:32 -0400 (EDT)
The man page states: "...like other pfNodes, pfDCSes are always allocated
from shared memory and cannot be created statically, on the stack or in
arrays." I am positive you are running into this in the first case and
assume so in the second case too. The following code dynamically allocates
an array of pfDCS pointers (optionally from the shared arena), and then it
loops through and dynamically allocates each pfDCS (calling the constructor
to boot):
pfDCS **dcsArray;
dcsArray = new(pfGetSharedShared()) pfDCS *[4];
for (int i=0; i<4; i++)
dcsArray[i] = new pfDCS();
-- Scott McMillan | HT Medical, Inc. | Developing medical VE's scott++at++ht.com | http://www.ht.com | surgical simulations Ph: 301-984-3706 |6001 Montrose Rd., #902| and surgery simulation Fax: 301-984-2104 | Rockville, MD 20852 | creation tools.======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:34 PDT