A. This code is built into Turbo C++ 1.0 but not in version 3.0.
In the 1.0 compiler, static members without definitions were given a
default value of 0. This default definition will no longer be made in the
compiler. The programmer must now give an explicit definition for each
static member. Here is a quick example:
class A
{
static int i;
};
A linker error saying that A::i is not defined will result unless the
source also contains a line such as:
int A::i = 1;
Thank you very much.
ReplyDeleteIt solves my problme