Admitting you he a books.h file containing the class Books declaration,
you need a CPP file (books.cpp can be good) that does
int Books::BookId = 0;
It is basically the same as venkatmakan
]did in his solution, but that way result in a "multiple definition" linker error, in case the "books.h" file is included by more "CPP" files.