Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!orion.oac.uci.edu!uci-ics!ucla-cs!rutgers!bpa!tci!dirk From: dirk@tci.UUCP (Dirk Butson) Newsgroups: comp.lang.c++ Subject: C compatiable ? Message-ID: <398@tci.UUCP> Date: 7 May 90 19:22:36 GMT Distribution: comp Organization: Technology Concepts, Inc. Sudbury Mass. Lines: 36 Please help me to understand if this is a problem with my compiler (Glockenspiel 2.0 A) or with C++ 2.0 in general. The following code shows an example which compiles as C code but, does not compile as C++ code. #include struct { int A; int B; int C; } ABCS = { 'a', 'b', 'c' }; /* The following line generates compile errors in C++ not in C. */ static int* abcs[] = { &(ABCS.A), &(ABCS.B), &(ABCS.C) }; main() { printf("abcs = %d, %d, %d\n", *(abcs[0]), *(abcs[1]), *(abcs[2])); } /* line 12: sorry, not implemented: general initializer in initializer list line 12: sorry, not implemented: general initializer in initializer list line 12: sorry, not implemented: general initializer in initializer list */ If you have had any experience with this type of problem with compilers besides Glockenspeil please let me know. If you have a workaround for this example I would also be very interested. I can be reached by email at dirk@tci.bell-atl.com. Thank-you, for all insights in advance.