I have a map with string and an class pointer. I am from JAVA so please guide me.
class Client {
public:
static map<string, Client*> CLIENTS;
Client(string dir);
static Client* get_client(string name);
virtual ~Client();
};
My get_client method is
Client* Client::get_client(string name) {
map<string, Client*>::iterator it = CLIENTS.find(name);
}
gives me the error below
Undefined symbols for architecture x86_64:
"Client::CLIENTS", referenced from:
Client::get_client(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in client.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status