Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!s3!robert From: robert@ireq.hydro.qc.ca (R.Meunier 8516) Newsgroups: comp.lang.c++ Subject: Automatic declaration of pointer to member in C structure Message-ID: <6840@s3.ireq.hydro.qc.ca> Date: 7 May 91 18:53:10 GMT Sender: usenet@s3.ireq.hydro.qc.ca Reply-To: robert@ireq.hydro.qc.ca () Organization: IREQ, Hydro-Quebec, QC, Canada Lines: 41 I am compiling some 'c' code in c++ and that kind of declaration is refuse by SUN C++ 2.0 --------------------------------------------------------------------- #include typedef struct a { int i; int j; int k; int l; void *m; } A; int z; A aa={1, 2, 3, 4, (void *)&z}; /* -- pointer to data ok */ A bb={1, 2, 3, 4, (void *)&(aa.l)}; /* ------ gives an error */ main() { void *p; /* declaration of pointer-to-member is ok inside function !!! */ p = &aa.j; cout << "passe dans t1.c \n"; } --------------------------------------------------------------------- when compiling, i get the following message: "t1.c", line 14: sorry, not implemented: general initializer in initializer list Is there a workaround? -- Robert Meunier Institut de Recherche d'Hydro-Quebec Ingenieur 1800 Montee Ste-Julie, Varennes Internet: robert@ireq.hydro.qc.ca Qc, Canada, J3X 1S1 maintainer: BASIC mailing list request to basic-request@ireq.hydro.qc.ca