Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!eldalonde!mckulka From: mckulka@eldalonde.endor.cs.psu.edu (Christopher Mc Kulka) Newsgroups: comp.lang.c++ Subject: Re: AT&T ODE Message-ID: <.82Gz6p71@cs.psu.edu> Date: 24 Mar 91 11:13:16 GMT References: <27EC1A78.14249@maccs.dcss.mcmaster.ca> Sender: news@cs.psu.edu (Usenet) Organization: Penn State Computer Science Lines: 26 Nntp-Posting-Host: eldalonde.endor.cs.psu.edu In article <27EC1A78.14249@maccs.dcss.mcmaster.ca> cui@maccs.dcss.mcmaster.ca (Jun Cui) writes: >I'm wandering if this version could support AT&T ODE. I tried to declare >a constant integer in a class: > > class test { > const int foo = 10; > // other .... > } > >When compiling it using AT&T Concurrent C++, I was given a message >'error: initializer for member test::foo'. >AT&T Concurrent C++ uses a different way to initialize a constant? What you need to do is have a constructor like the following test::test() : foo(10) { // do something} ; and remove the initializer from the class declaration. This is the same across all C++'s. >jun. Chris -- Just say *NO* to software patents & look-and-feel lawsuits. Try competition. If God had intended man to smoke he would have set him on fire. There are two ways to write an error-free program. Only the third works. Chris McKulka (mckulka@bree.endor.cs.psu.edu)