greetz,
me and a C++ programmer i know have a C++ program that would
compile cleanly and run when using gcc 2.95.3 (from openbsd
3.6-release), but now that i've upgraded to 3.7-release, which
uses gcc 3.3.5, he gets errors on compilation. since neither
of us are very familiar with the details of upgrades in gcc
(he codes on M$ visual studio at work), i would appreciate
either direct suggestions on the errors i list below or a more
general plan for "what to do to quickly resolve syntax errors
upon upgrade of gcc".
here are the errors:
$ g++ -c agent.cpp
In file included from array.h:10,
from inputdata.h:13,
from agent.h:10,
from agent.cpp:9:
In file included from inputdata.h:13,
from agent.h:10,
from agent.cpp:9:
array.h: At global scope:
array.h:32: error: invalid data member initialization
array.h:32: error: (use `=' to initialize static data members)
array.h:32: error: variable or field `out' declared void
array.h:152: error: variable or field `out' declared void
array.h:152: error: `Array<T>::out' declared as an `inline'
variable
array.h:152: error: `int Array<T>::out' is not a static member
of `class
Array<T>'
array.h:152: error: template definition of non-template `int
Array<T>::out'
array.h:152: error: syntax error before `{' token
In file included from inputdata.h:13,
from agent.h:10,
from agent.cpp:9:
array.h:7:1: unterminated #ifndef
In file included from agent.h:10,
from agent.cpp:9:
inputdata.h:7:1: unterminated #ifndef
In file included from agent.cpp:9:
agent.h:7:1: unterminated #ifndef
*** Error code 1
and here are the lines of code where the errors occur (lines
32 and 152 from array.h):
32: void out (ostream& os) const;
152: inline void Array <T>::out (ostream& os) const
if what i'm asking for is easily found in docs, i would
greatly appreciate a redirect modulo excessive flame. the
redirect need not be unique, as excessive flame is certainly
not prime.
cheers,
jake