Possible Duplicate:
C++ static constant string (class member)
static const C++ class member initialized gives a duplicate symbol error when linking
My experience with C++ pre-dated the addition of the string class, so I'm starting over in some ways.
I'm defining my header file for my class and want to create a static constant for a url. I'm attempting this by doing as follows:
#include <string>
class MainController{
private:
static const std::string SOME_URL;
}
const std::string MainController::SOME_URL = "www.google.com";
But this give me a duplicate definition during link.
How can I accomplish this?