I got an error when compiling my program:
LNK2001 unresolved external symbol "public: static class Bomb * * Bomb::bombs" (?bombs@Bomb@@2PAPAV1@A)
I know that I have to define static Bomb *bombs[14]
in my .cpp
, but I don't know how.
My .h
file:
class Bomb {
public:
static Bomb *bombs[14];
static int num_bombs;
...
What do I need to add in my .cpp file?