[comp.lang.c++] initialization of static class member

sml@beach.cis.ufl.edu (Shein-Fong Law) (01/25/90)

 

 I used Zortech C++ 1.x compiler to compile the following code.

  class string {
      static int AlloIncr;
      .
      .
      .
}
In my program I initialize AlloIncr as follows:
int string::AlloIncr = 8;
When I compiled it I got the error message "symbol AlloIncr already defined"
. I understand that if I use Zortech 2.00 version, there will not be any
error. Can any one tell me how should I correct the error?(how should I
initialize AlloIncr to a nonzero value?) . Thanks in advance.