I have a class in C++, say "Customer", and I want to have a member of it for ID,
private:
const string x; // Customer's ID
now the normal constructor would look like this:
Customer::Customer(const string& ID): x(ID){}
Now, I want to build a default constructor, without initializing x. Is it possible? Because if I initialize it to some random value, say "untitled" then I can't change it anymore because its a const.
So should I not build a default constructor at all, or is there a possibility of building one that doesn't initialize x and you can do that later?