Code:// MAIN.cpp #include <iostream> #include "Person.h" using namespace std; int main() { return 0; }Code:// Person.h #ifndef PERSON_H #define PERSON_H class Person { public: static int testme; }; int Person::testme = 10; #endifIt shows me linker error. static int testme already defined.Code://Person.cpp #include "Person.h"
I want to use testme in both person.cpp and main.cpp.. Now what should I do?